“在我的应用程序中未检测到任何源存储库.请检查URL,然后重试. [英] "No source repositories were detected at(my app). Please check the URL and try again."
问题描述
我在这里有我的Heroku应用程序的URL: https://damp-sands-09329. herokuapp.com/.
I have a URL for my Heroku app here: https://damp-sands-09329.herokuapp.com/.
当我转到 https://github.com/new/import 时,被告知输入您的旧存储库的克隆URL",然后输入站点URL,它对我说
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
在以下位置未检测到源存储库 https://damp-sands-09329.herokuapp.com/.请检查网址,然后尝试 再次.
No source repositories were detected at https://damp-sands-09329.herokuapp.com/. Please check the URL and try again.
为什么会这样?
推荐答案
Github是正确的,您提供的不是有效的Git存储库URL.
Github is correct, what you provided is not a valid Git repository URL.
Heroku网站或Web URL(格式为 https://xxxxxx.herokuapp.com/ )是您的网站部署的地方,但不是源代码存储的地方.
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.
您想要的是Heroku Git URL.您可以通过两种方式获取此信息:
What you want is the Heroku Git URL. You can get this in 2 ways:
-
在Heroku仪表板中
From the Heroku dashboard
登录到您的Heroku仪表板( https://dashboard.heroku.com ),转到您的应用,然后转到设置,然后滚动到信息部分.它是指定为 Heroku Git URL 的一个,其格式为 https://git.heroku.com/xxxxxxx.git .
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.
从Heroku CLI
From the Heroku CLI
如果安装了Heroku CLI,则可以使用 apps:info
命令获取Git URL.
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/
请注意,它显示了Git URL和Web URL. Github需要Git URL.
Notice that it shows the Git URL and the Web URL. Github wants the Git URL.
这篇关于“在我的应用程序中未检测到任何源存储库.请检查URL,然后重试.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!