0
我们的组织中有一个新的GitLab服务器。我打开了一个新项目并按照他们的帮助页面创建了一个SSH对。但是我无法推送初始提交。 GitLab告诉我这样做:为什么我无法推送到GitLab存储库?
cd existing_folder
git init
git remote add origin
[email protected]:Groupname/Projectname.git
git add .
git commit -m "Initial commit"
git push -u origin master
所有这些步骤都起作用,除了最后一步之外。当我试图把它说:
ssh: Could not resolve hostname myorganization: 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.
我用git remote -v
,我注意到它的输出具有Myorganization
以大写字母(在中间的某个地方,“myorganization”只是一个占位符)。然后我尝试了git remote set-url origin
并输入了从git remote -v
的输出。但试图推动仍然导致上述错误。在错误消息中,myorganization
保持小写。我不知道区分大小写是否可以在这里发挥作用,这只是我注意到的。
这似乎是一个比GitLab更多的DNS问题。 '''host myorganization'''命令是否可以解析机器的IP? – alexp
你必须使用代理吗?如果是这样的话:你是否设置了git的代理? – Pixelchemist
是的,'host myorganization'以及'host Myorganization'解析服务器IP。 – speedymcs