我能够通过HTTPS身份验证克隆此repo的副本.我做了一些提交,想要推回到GitHub服务器.在Windows 7 x64上使用Cygwin.
C:\cygwin\home\XPherior\Code\lunch_call>git push
Password:
error: The requested URL returned error: 403 while accessing https://MichaelDrog
alis@github.com/derekerdmann/lunch_call.git/info/refs
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
同时使用详细模式进行设置.我还是很困惑.
C:\cygwin\home\XPherior\Code\lunch_call>set GIT_CURL_VERBOSE=1
C:\cygwin\home\XPherior\Code\lunch_call>git push
Password:
* Couldn't find host github.com in the _netrc file; using defaults
* About to connect() to github.com port 443 (#0)
* Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
* Connected to github.com (207.97.227.239) port 443 (#0)
* successfully set certificate verify locations:
* CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt
CApath: none
* SSL …Run Code Online (Sandbox Code Playgroud) 我想将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请求失败
请告诉我如何在没有密码的情况下推送.