2012-06-06 93 views
0

我鍵入到終端:錯誤推我的倉庫到Github上

Parkers-MacBook-Pro:first_app ppreyer$ git push -u origin master 
Username: 
Password: 

而且我得到這個錯誤:

error: The requested URL returned error: 403 while accessing https://github.com/ppreyer/first_app.git/info/refs 

fatal: HTTP request failed 

我猜它是與我的用戶名和密碼,但我覺得我正在輸入正確的信息。有沒有辦法找出我的用戶名和密碼是什麼?

+0

嘗試[您的密碼](http://stackoverflow.com/a/8898992/262852) – Thufir

回答

1

看起來像你的遠程URL是錯誤的。

嘗試運行以下命令:

git remote rm origin 
git remote add origin [email protected]:ppreyer/first_app.git 
git push origin master 
+0

後,我用git推起源主我得到這個錯誤:錯誤:SRC的Refspec主不匹配任何。 錯誤:未能推動一些裁判'[email protected]:ppreyer/first_app.git'有什麼想法? – ppreyer

0

你可能已經克隆只讀URL公衆。 另外它更好,如果你可以設置SSH密鑰,並將其添加到您的github帳戶。按照guide

要解決您可以面對的問題,您可以按照Gazier發佈的答案。我正在增加一種做法。您的回購目錄下

  1. 編輯.git/config文件
  2. 找到url=entry[remote "origin"]
  3. 確保它是[email protected]:ppreyer/first_app.git

現在試圖推動起源掌握