小编tec*_*uma的帖子

推送到Git返回错误代码403致命

我想将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
Run Code Online (Sandbox Code Playgroud)

但是,发生以下错误.

error: The requested URL returned error: 403 Forbidden while accessing https://github.com/user/repo.git/info/refs

fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)

我知道这样解决这个错误

git remote set-url origin https://username@github.com/user/repo.git
Run Code Online (Sandbox Code Playgroud)

这样,我必须输入密码.

$ git push origin master
Password: 
Run Code Online (Sandbox Code Playgroud)

但我不想输入密码.

我检查了这个,但我没有解决.
推送到Git返回错误代码403致命:HTTP请求失败

请告诉我如何在没有密码的情况下推送.

git github git-push

15
推荐指数
2
解决办法
6万
查看次数

标签 统计

git ×1

git-push ×1

github ×1