问题
I have a URL for my Heroku app here: https://damp-sands-09329.herokuapp.com/.
When I go to https://github.com/new/import, I am told to enter "Your old repository’s clone URL" and I entered the site URL and it said to me
No source repositories were detected at https://damp-sands-09329.herokuapp.com/. Please check the URL and try again.
Why is this happening?
回答1:
Github is correct, what you provided is not a valid Git repository URL.
The Heroku site or web URL (of the form https://xxxxxx.herokuapp.com/) is where your website is deployed, but that's not where the source codes are stored.
What you want is the Heroku Git URL. You can get this in 2 ways:
From the Heroku dashboard
Login into your Heroku dashboard (https://dashboard.heroku.com), go to your app, then go to Settings, then scroll to the Info section. It's the one specified as the Heroku Git URL and is of the form https://git.heroku.com/xxxxxxx.git.
From the Heroku CLI
If you have Heroku CLI installed, you can use the apps:info command to get the Git URL.
$ heroku apps:info app-name === app-name ... Git URL: https://git.heroku.com/app-name.git ... Web URL: https://app-name.herokuapp.com/Notice that it shows the Git URL and the Web URL. Github wants the Git URL.
来源:https://stackoverflow.com/questions/59550438/no-source-repositories-were-detected-atmy-app-please-check-the-url-and-try-a