2013-02-01 76 views
0

我想將文件添加到github上如下:不能添加文件到github上

git init 
touch test.txt 
git add test.tst 
git cmmit -m'testtest' 
git push origin master 

那麼就會引發此異常:

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

fatal: HTTP request failed 

然後我驗證的公共密鑰連接到我的github帳戶:

$ ssh -T [email protected] 
Hi yacheng1127! You've successfully authenticated, but GitHub does not provide shell access. 

$ ssh-add -l 
2048 1a:a1:33:26:21:68:7e:9c:26:19:fb:74:a4:d1:6b:bd [email protected] (RSA) 

然後我檢查我的遠程網址:

$ git remote -vorigin 
origin  https://github.com/yacheng1127/YWProject.git (fetch) 
origin https://github.com/yacheng1127/YWProject.git (push) 

我不知道問題在哪裏。有人能幫助我嗎?謝謝

+0

[推送到Git返回錯誤代碼403致命:HTTP請求失敗](http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request - 失敗) –

+0

我看到「git cmmit」與「git commit」? – sjakubowski

+0

我很抱歉,我輸入了錯誤的密碼。 – wuwucat

回答