我想将文件添加到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)
我不知道问题在哪里。有人能帮助我吗?谢谢
[推送到Git返回错误代码403致命:HTTP请求失败](http://stackoverflow.com/questions/7438313/pushing-to-git-returning-error-code-403-fatal-http-request - 失败) –
我看到“git cmmit”与“git commit”? – sjakubowski
我很抱歉,我输入了错误的密码。 – wuwucat