2013-03-25 46 views
0

我已經加入SSH密鑰對我的本地回購(這是我從我的github回購克隆錯誤訪問GitHub的帳戶本地

當我嘗試推提交給遠程GitHub庫,我得到以下信息:

fatal: '[email protected]/username/reponame.git' does not appear to be a git repository 
fatal: Could not read from remote repository. 
Please make sure you have the correct access rights 
and the repository exists. 

我也試着改變遠程名git://github.com/username/reponame.git,但沒有奏效。

我在哪裏可以指定我的用戶名/密碼來訪問遠程回購(或如果它嵌入獨特的SSH密鑰這只是我做錯了什麼,然後幫助)?

注 - 我有我的密鑰輸入在我的github帳戶。

請指導我在正確的方向。

回答

0

你似乎有在URL中的GitHub庫一個錯字:

[email protected]/username/reponame.git 

相反,你應該使用:

[email protected]:username/reponame.git 

要爲遠程命名由來更新網址:

git remote set-url origin [email protected]:username/reponame.git 

之後嘗試git fetch origin以查看是否能夠從遠程獲取更改。如果這樣,你應該也可以運行git push origin(前提是你的SSH密鑰是有效的,並且你已經按照步驟將它們正確添加到你的github賬戶中)。

+0

這樣做。謝謝! – piyushdubey 2013-03-25 17:17:22