我想在 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 git@github.com
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 yacheng1127@gmail.com (RSA)
然后我检查我的远程网址:
$ git remote -vorigin
origin https://github.com/yacheng1127/YWProject.git (fetch)
origin https://github.com/yacheng1127/YWProject.git (push)
我不知道问题出在哪里。有人可以帮助我吗?谢谢你