gpt4 book ai didi

git - bitbucket 无法从存储库中 pull/推送

转载 作者:IT王子 更新时间:2023-10-29 01:08:22 24 4
gpt4 key购买 nike

所以基本上我有一个服务器,我在其中设置了 bitbucket git 存储库。我已经使用它几个月了,现在当我尝试 pull 时,出现了以下错误:

ssh: Could not resolve hostname bitbucket.org: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我 100% 确定我已经正确设置了我的 ssh-keys。

git remote -v
origin git@bitbucket.org:marel/tshirtmafia.git (fetch)
origin git@bitbucket.org:marel/tshirtmafia.git (push)

关于如何解决这个问题有什么建议吗?如果您还需要什么,请告诉我。

最佳答案

此问题是由不正确的 git 配置引起的。打开项目根文件夹中的 .git 文件夹,并在配置文件中找到以

开头的行

url = git@bitbucket.org

很可能你在那里指定了协议(protocol)并定义了 urlurl = ssh://git@bitbucket.org

删除 ssh://,它应该可以解决问题。

关于git - bitbucket 无法从存储库中 pull/推送,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29747969/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com