问题描述
因此,基本上,我有一台服务器,其中设置了bitbucket git存储库.我已经使用了几个月了,现在尝试拉出蓝天时出现以下错误:
So basically I have a server where I have bitbucket git repository set up. I've been using it for months and now out of the blue sky when I try to pull I get the following error:
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键.
I'm 100% sure I have correctly setup my ssh-keys.
git remote -v
origin git@bitbucket.org:marel/tshirtmafia.git (fetch)
origin git@bitbucket.org:marel/tshirtmafia.git (push)
任何建议如何解决此问题?如果您还有其他需要,请告诉我.
Any suggestions how to fix this ? Please let me know if you need anything else.
推荐答案
此问题是由错误的git配置引起的.在项目的根文件夹中打开.git文件夹,在配置文件中,请找到以
This issue is caused by incorrect git configuration.Open .git folder in root folder of your project and in config file please find the line that starts with
url = git@bitbucket.org
url = git@bitbucket.org
很可能您已经在其中指定了协议并定义了url,例如网址= ssh://git@bitbucket.org
Most probably you have specified protocol there and defined url likeurl = ssh://git@bitbucket.org
删除 ssh://,它将为您解决问题.
remove ssh:// and it should do the trick for you.
这篇关于bitbucket无法从存储库中拉/推的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!