本文介绍了使用命令行克隆git repo会失败,但使用git GUI客户端(例如SourceTree)会失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在Mac OSX 10.7系统上设置了一个 git
用户。在git用户的根目录下,我创建了一个 repositories
文件夹,并初始化一个名为 test
的裸git库。 p>
到目前为止这么好。现在,我使用与Mac相同的网络克隆PC上的回购站点:
git clone git @ mac:repositories / test .git
成功。那么,我可以推动并从这个回购拉。看起来不错。
但是,当试图用Atlassian SourceTree做一样的事情 - 一个GUI git客户端 - 失败:
这不是一个有效的源路径/ URL
任何人都知道我可能做错了什么? 解决方案
需要一个用户名,这样源路径/ URL条目就是路径 repositories / test.git
您可以通过点击右侧的按钮来看到这一点,文件对话框。
一个URL可能会工作,但它的形式是protocol :: user @ address / path,你必须有一台服务器在机器上运行回应请求(在这种情况下是git或http服务器)
I've set up a git
user on a Mac OSX 10.7 system. In the git user's root, I've created a repositories
folder and initialized a bare git repo named test
.
So far so good. Now, I clone the repo from a PC on the same network as the Mac with
git clone git@mac:repositories/test.git
This succeeds. I can then, push and pull from this repo. All looks good.
But, when trying to do the same thing with Atlassian SourceTree - a GUI git client - this fails:
This is not a valid source path / URL
Anyone an idea what I might be doing wrong?
解决方案
In this case you do not need a user name so the "Source Path/URL" entry is just the path repositories/test.git
You would see this by hitting the button to the right which gives an open file dialog.
A URL might work but that would be of a form protocol::user@address/path and you would have to have a server running on the machine to respond to the request (in this case a git or http server)
这篇关于使用命令行克隆git repo会失败,但使用git GUI客户端(例如SourceTree)会失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!