2014-11-14 117 views
1

我創建了我的github帳戶和一個人將我添加到私人存儲庫。加入我後,我可以看到代碼並將其分開。現在,當我嘗試從分叉版本庫分叉後克隆存儲庫時,出現錯誤。這裏是我使用的命令git無法克隆後分叉私人存儲庫

git clone https://github.com/my_username/forked_repo.git 
Cloning into 'project'... 
remote: Repository not found. 
fatal: repository 'https://github.com/my_username/forked_repo.git/' not found 

有人可以幫助我。

在此先感謝。我是git的新手。

+0

在命令中是否是「my_username」是用戶名? – Geomorillo 2014-11-14 20:31:32

+0

例如我想克隆wecalendar這是網址https://github.com/ronisaha/wdCalendar.git – Geomorillo 2014-11-14 20:35:11

+0

你可以按照這裏的文檔https://help.github.com/articles/fork-a-repo/ – Geomorillo 2014-11-14 20:36:54

回答

0

我發現問題,這是私人回購,所以試圖使用SSH克隆,但顯示相同的錯誤。問題是我沒有將ssh密鑰添加到帳戶。這些步驟是

1)生成的粘貼的關鍵的github帳戶中複製的ssh密鑰

2)的關鍵

3)。

它解決了這個問題。

0

我不跟我的帳戶登錄,我拉了回購沒有問題,無論是公立還是私立:

$ git status 
fatal: Not a git repository (or any of the parent directories): .git 
$ 
$ 
$ git clone https://github.com/ronisaha/wdCalendar 
Cloning into 'wdCalendar'... 
remote: Counting objects: 172, done. 
remote: Total 172 (delta 0), reused 0 (delta 0) 
Receiving objects: 100% (172/172), 246.59 KiB | 0 bytes/s, done. 
Resolving deltas: 100% (14/14), done. 
Checking connectivity... done 
$ git --version 
git version 1.8.4 

有幾個重要的變量,以確保配置:

@ user2413621我從我的私人回購中做了同樣的事情。再次檢查你的配置。

$ git config --global user.name "my name" 
$ git config --global user.email "[email protected]" 
$ git remote 
origin << If nothing is listed here 
$ git remote set-url --add upstream https://gitstuff.com/lalaa 

如果您有正確的上游設置。我想use this tutorial page,以確保你有正確安裝的命令行工具。

+0

我的回購是從私人存儲庫分出的... – user2413621 2014-11-15 03:47:34

+0

查看已更新的答案,配置'remote'。我在私人回購上也是這樣做的。 – mbb 2014-11-15 15:09:03