我在这里有我的Heroku应用程序的URL:https://damp-sands-09329.herokuapp.com/。
[转到https://github.com/new/import时,我被告知输入“您的旧存储库的克隆URL”,然后输入了站点URL,它对我说了
没有在以下位置检测到源存储库https://damp-sands-09329.herokuapp.com/。请检查网址,然后尝试再次。
为什么会这样?
Github是正确的,您提供的不是有效的Git存储库URL。
Heroku网站或Web URL(格式为https://xxxxxx.herokuapp.com/)是您的网站部署的地方,但不是源代码存储的的地方。
您想要的是Heroku Git URL。您可以通过两种方式获取此信息:
从Heroku仪表板
登录到Heroku仪表板(https://dashboard.heroku.com),转到您的应用程序,然后转到设置,然后滚动到Info部分。它是指定为Heroku Git URL的形式,格式为https://git.heroku.com/xxxxxxx.git。
从Heroku CLI
如果安装了Heroku CLI,则可以使用apps:info
命令获取Git URL。
apps:info
注意,它显示了Git URL和Web URL。 Github需要Git URL。