无法从SourceTree在github上克隆私人仓库 [英] Can't clone private repo on github from SourceTree
问题描述
在此处中描述了类似的问题,但是,我的症状有所不同,并且所有步骤似乎都不起作用.该建议在此处也不起作用.
A similar issue is described here however, my symptoms are a little different and none of the steps there seemed to work. Nor does the suggestion here work.
我正在尝试使用SourceTree克隆属于我所属的github组织的私有存储库.我具有查看和提交回购协议的全部权限,登录后可以在线查看它,并且可以通过命令行以及通过github桌面应用程序进行克隆.它仅在SourceTree中失败.
I'm attempting to use SourceTree to clone a private repo belonging to github organization of which I am a part. I have full permissions to view and commit to the repo, I can see it online when I log in, AND I can clone just fine with the command line and also via the github desktop application. It only fails in SourceTree.
此外,它不是坏凭证或类似的东西,因为我可以使用SourceTree和我的github凭证在github上克隆,提交和推送到我的其他非私有存储库.
Further, it is not bad credentials or anything like that, because I can clone, commit and push to my other non-private repos on github using SourceTree with my github credentials.
从克隆存储库"对话框中,输入源URL,如下所示:
From the "Clone a Repository" dialog I enter the source URL, which looks something like this:
https://github.com/MyOrgName/reponame.git
我从该字段制表符关闭,它填充了目标路径和名称字段,但是在对话框的底部是带有此错误的黄色感叹号:
I tab off of that field and it populates the destination path and name fields, but at the bottom of the dialog is a yellow exclamation point with this error:
This is not a valid source path / URL
如果单击错误消息,则会弹出详细信息"对话框,其中显示以下内容(由于某些原因两次):
If I click the error message, it brings up the "Details" dialog, which states the following (twice for some reason):
remote: Repository not found.
fatal: repository 'https://github.com/MyOrgName/reponame.git/' not found
remote: Repository not found.
fatal: repository 'https://github.com/MyOrgName/reponame.git/' not found
我也尝试过通过将用户名添加到url中来进行此操作,
I have also tried this by adding my username to the url like so:
https://myusername@github.com/MyOrgName/reponame.git
但那里也没有运气.
推荐答案
我遇到了同样的问题.我的解决方法:
I had same problem. My fix way:
-
从SourceTree设置中删除用户(可选,我不确定);
Remove user from SourceTree settings (optional, i not sure);
在设置中添加您的帐户并生成新的SSH密钥(这是修复的主要部分);
Add you account in setting and generate new SSH key (it's a main part of fix);
克隆您的仓库;
如果SourceTree不能克隆存储库,则可以尝试从SourceTree主页选择外部存储库进行克隆.
If SourceTree sill can't clone repo you can try to clone from main page of SourceTree choosing external repos.
这篇关于无法从SourceTree在github上克隆私人仓库的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!