git 使用 SourceTree 克隆存储库
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14072361/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cloning a repository with SourceTree
提问by soleil
Can someone give me a quick walkthrough on simply cloning a repo with SourceTree?
有人能给我一个简单的使用 SourceTree 克隆 repo 的快速演练吗?
In Bookmarks, I click on Clone Repository. For Source Path I paste in the URL which looks like this:
在书签中,我单击克隆存储库。对于源路径,我粘贴了如下所示的 URL:
[email protected]:client/appname/ios-application.git
[email protected]:client/appname/ios-application.git
But I get "This is not a valid source path / URL".
但我得到“这不是有效的源路径/URL”。
I'm copying directly from the Repository Browser in codebase so I know the URL is correct.
我直接从代码库中的存储库浏览器复制,所以我知道 URL 是正确的。
What else do I need to do?
我还需要做什么?
回答by Y Zhang
My solution was to change the Git version from 'Use Embedded Git' to 'Use System Git'. Because I installed GitHub on my computer earlier, it seems SourceTree chose that Git by default rather than download the embedded version when it was installed.
我的解决方案是将 Git 版本从“使用嵌入式 Git”更改为“使用系统 Git”。因为我之前在我的电脑上安装了 GitHub,所以 SourceTree 似乎默认选择了那个 Git,而不是在安装时下载嵌入式版本。
回答by Alex Patton
I helped a friend resolve this simply by filling in name and email address for 'Default user information', found in the General tab under Tools/Options(Windows) or SourceTree/Preferences(iOS)
我帮助朋友解决了这个问题,只需在工具/选项(Windows)或 SourceTree/Preferences(iOS)下的常规选项卡中填写“默认用户信息”的姓名和电子邮件地址
回答by whiteElephant
The solution for me was to confirm my email address. So if you haven't already, check your emails and find the one from your source repository provider (e.g. bitbucket). You should have a confirm email section in the email.
我的解决方案是确认我的电子邮件地址。因此,如果您还没有,请检查您的电子邮件并从您的源存储库提供商(例如 bitbucket)中找到一个。您应该在电子邮件中有一个确认电子邮件部分。
回答by VonC
As illustrated in this Atlassian thread, this is usually related to a credential issue.
如此Atlassian 线程 所示,这通常与凭证问题有关。
In your case, it could be an ssh configuration problem, with no or the wrong ssh public/private keys.
Or, still for ssh, it can be related to ssh keys incorrectly registered.
在您的情况下,这可能是 ssh 配置问题,没有或错误的 ssh 公钥/私钥。
或者,对于 ssh,它可能与ssh 密钥注册错误有关。
回答by Mladen Rakonjac
In my case I had to dis-check this: Options > Network > add proxy server conf to Git/Mercurial
在我的情况下,我不得不取消检查:选项 > 网络 > 将代理服务器配置添加到 Git/Mercurial
回答by William Smith
In my case the way I finally solved it was to uninstall SourceTree, delete the X:/Users/UserName/AddData/Local/Atlassianfolder, and the reinstall the latest SourceTree. Then I went through the SourceTree setup, cloned the remote repo as normal, and I was back in business.
就我而言,我最终解决的方法是卸载 SourceTree,删除X:/Users/UserName/AddData/Local/Atlassian文件夹,然后重新安装最新的 SourceTree。然后我完成了 SourceTree 设置,像往常一样克隆了远程存储库,然后我又开始营业了。
As a reminder, if you go this route and you have local changes that haven't been pushed yet (like I did) make sure you copy those out to another folder BEFORE you start this process, just to be on the safe side.
提醒一下,如果您走这条路线并且您有尚未推送的本地更改(就像我所做的那样),请确保在开始此过程之前将这些更改复制到另一个文件夹中,以确保安全。
回答by moonlightcat
I had that problem after installing new SourceTree version.
安装新的 SourceTree 版本后我遇到了这个问题。
In my case it helped to uninstall Git from my Programs. When I started SourceTree again it asked to install Git, so I did and the problem was fixed.
就我而言,它有助于从我的程序中卸载 Git。当我再次启动 SourceTree 时,它要求安装 Git,所以我安装了并解决了问题。
Kinda brutal solution, but didn't want to spend more time trying to figure out the problem.
有点残酷的解决方案,但不想花更多时间试图找出问题所在。
回答by Rafael Gonzalez
i have dowloaded the sourcetree an the GIT an use the local GIT installed not what sourcetree offers. that resolves the error.
我已经下载了 sourcetree 和 GIT,并使用了本地 GIT 安装而不是 sourcetree 提供的。这解决了错误。
回答by Anton Duzenko
It happened to me when I first run SourceTree after installing. Restarting SourceTree and this particular error went away.
我在安装后第一次运行 SourceTree 时发生了这种情况。重新启动 SourceTree 并且此特定错误消失了。
回答by bedouger
For me the issue was it wouldn't accept my password. The fix was in Preferences > Network > edit the default entry to set my github username rather than my Mac username.
对我来说,问题是它不接受我的密码。修复位于首选项 > 网络 > 编辑默认条目以设置我的 github 用户名而不是我的 Mac 用户名。