“在我的应用程序中未检测到源存储库。请检查URL,然后重试。”

问题描述 投票:1回答:1

我在这里有我的Heroku应用程序的URL:https://damp-sands-09329.herokuapp.com/

[转到https://github.com/new/import时,我被告知输入“您的旧存储库的克隆URL”,然后输入了站点URL,它对我说了

没有在以下位置检测到源存储库https://damp-sands-09329.herokuapp.com/。请检查网址,然后尝试再次。

为什么会这样?

github heroku
1个回答
0
投票

Github是正确的,您提供的不是有效的Git存储库URL。

Heroku网站或Web URL(格式为https://xxxxxx.herokuapp.com/)是您的网站部署的地方,但不是源代码存储的的地方。

您想要的是Heroku Git URL。您可以通过两种方式获取此信息:

  1. 从Heroku仪表板

    登录到Heroku仪表板(https://dashboard.heroku.com),转到您的应用程序,然后转到设置,然后滚动到Info部分。它是指定为Heroku Git URL的形式,格式为https://git.heroku.com/xxxxxxx.git

    enter image description here

  2. 从Heroku CLI

    如果安装了Heroku CLI,则可以使用apps:info命令获取Git URL。

    apps:info

    注意,它显示了Git URL和Web URL。 Github需要Git URL。

© www.soinside.com 2019 - 2024. All rights reserved.