【发布时间】:2015-03-15 18:28:15
【问题描述】:
我想将 README.md 推送到 Github。
使用 Ubuntu 14.04LTS
所以,我按照以下步骤提交。
echo "# test" >> README.md
git init
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/user/repo.git
git push -u origin master
但是,发生了以下错误。
error: The requested URL returned error: 403 Forbidden while accessing https://github.com/user/repo.git/info/refs
fatal: HTTP request failed
我知道这样解决这个错误
git remote set-url origin https://username@github.com/user/repo.git
这样,我必须输入密码。
$ git push origin master
Password:
但我讨厌输入密码。
我已经检查过了,但我没有解决。
Pushing to Git returning Error Code 403 fatal: HTTP request failed
请告诉我如何在没有密码的情况下推送。
【问题讨论】: