“No source repositories were detected at(my app). Please check the URL and try again.”

陌路散爱 提交于 2020-01-21 18:59:30

问题


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:

  1. 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.

  2. 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

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!