克隆私人Github回购 [英] Cloning a private Github repo

查看:157
本文介绍了克隆私人Github回购的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Github上有一个私人存储库,用于我正在开发的一个项目。到目前为止,我只在家用台式机上工作,但我只是买了一台笔记本电脑,并试图设置它,以便我可以从任一台计算机上处​​理项目,并推/拉变更。

我为笔记本电脑的Github帐户添加了一个新的SSH密钥,并成功克隆并更改了我设置的公共测试回购。但是,我无法克隆私人回购。为了克隆私人回购,我需要在命令行中做什么特别的事情?我需要为我的笔记本电脑设置一个新的GitHub帐户,并将自己设置为协作者吗?



我使用的命令是 git clone git ://github.com/myusername/reponame.git

解决方案

专用克隆网址采用表单 git@github.com:username / repo.git - 也许您需要使用 git @ 而不是 git://



git:// 读取网址只有私人回购才会允许这种形式的访问。


I have a private repository on Github for a project I'm working on. Until now I had only worked on my home desktop, but I just bought a laptop, and am trying to set it up so that I can work on the project from either computer, and push / pull changes.

I added a new SSH key to my Github account for the laptop, and was successful in cloning and making changes to a public test repo that I set up. However, I couldn't clone the private repo. Is there anything special I need to do in the command line in order to clone a private repo? Do I need to set up a new GitHub account for my laptop and set myself up as a collaborator?

The command I used was git clone git://github.com/myusername/reponame.git

解决方案

Private clone URLs take the form git@github.com:username/repo.git - perhaps you needed to use git@ rather than git://?

git:// URLs are read only, and it looks like private repos do not allow this form of access.

这篇关于克隆私人Github回购的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆