首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >推送到Git返回错误代码403:HTTP请求失败?

推送到Git返回错误代码403:HTTP请求失败?

提问于 2017-12-19 15:50:46
回答 2关注 0查看 2.1K

我能够通过HTTPS验证克隆此回购的副本。我做了一些提交,并希望推回到GitHub服务器。在Windows 7 x64上使用Cygwin。

代码语言:txt
复制
C:\cygwin\home\XPherior\Code\lunch_call>git push
代码语言:txt
复制
Password:
代码语言:txt
复制
error: The requested URL returned error: 403 while accessing https://MichaelDrog
代码语言:txt
复制
alis@github.com/derekerdmann/lunch_call.git/info/refs
代码语言:txt
复制
代码语言:txt
复制
fatal: HTTP request failed

还要设置详细模式。我仍然很困惑。

代码语言:txt
复制
C:\cygwin\home\XPherior\Code\lunch_call>set GIT_CURL_VERBOSE=1
代码语言:txt
复制
代码语言:txt
复制
C:\cygwin\home\XPherior\Code\lunch_call>git push
代码语言:txt
复制
Password:
代码语言:txt
复制
* Couldn't find host github.com in the _netrc file; using defaults
代码语言:txt
复制
* About to connect() to github.com port 443 (#0)
代码语言:txt
复制
*   Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
代码语言:txt
复制
* Connected to github.com (207.97.227.239) port 443 (#0)
代码语言:txt
复制
* successfully set certificate verify locations:
代码语言:txt
复制
*   CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt
代码语言:txt
复制
  CApath: none
代码语言:txt
复制
* SSL connection using AES256-SHA
代码语言:txt
复制
* Server certificate:
代码语言:txt
复制
*        subject: 2.5.4.15=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.
代码语言:txt
复制
3.6.1.4.1.311.60.2.1.2=California; serialNumber=C3268102; C=US; ST=California; L
代码语言:txt
复制
=San Francisco; O=GitHub, Inc.; CN=github.com
代码语言:txt
复制
*        start date: 2011-05-27 00:00:00 GMT
代码语言:txt
复制
*        expire date: 2013-07-29 12:00:00 GMT
代码语言:txt
复制
*        subjectAltName: github.com matched
代码语言:txt
复制
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Ass
代码语言:txt
复制
urance EV CA-1
代码语言:txt
复制
*        SSL certificate verify ok.
代码语言:txt
复制
> GET /derekerdmann/lunch_call.git/info/refs?service=git-receive-pack HTTP/1.1
代码语言:txt
复制
User-Agent: git/1.7.4.3282.g844cb
代码语言:txt
复制
Host: github.com
代码语言:txt
复制
Accept: */*
代码语言:txt
复制
Pragma: no-cache
代码语言:txt
复制
代码语言:txt
复制
< HTTP/1.1 401 Authorization Required
代码语言:txt
复制
< Server: nginx/1.0.4
代码语言:txt
复制
< Date: Thu, 15 Sep 2011 22:44:41 GMT
代码语言:txt
复制
< Content-Type: text/plain
代码语言:txt
复制
< Connection: keep-alive
代码语言:txt
复制
< Content-Length: 55
代码语言:txt
复制
< WWW-Authenticate: Basic realm="GitHub"
代码语言:txt
复制
<
代码语言:txt
复制
* Ignoring the response-body
代码语言:txt
复制
* Expire cleared
代码语言:txt
复制
* Connection #0 to host github.com left intact
代码语言:txt
复制
* Issue another request to this URL: 'https://MichaelDrogalis@github.com/dereke
代码语言:txt
复制
dmann/lunch_call.git/info/refs?service=git-receive-pack'
代码语言:txt
复制
* Couldn't find host github.com in the _netrc file; using defaults
代码语言:txt
复制
* Re-using existing connection! (#0) with host github.com
代码语言:txt
复制
* Connected to github.com (207.97.227.239) port 443 (#0)
代码语言:txt
复制
* 0x23cb740 is at send pipe head!
代码语言:txt
复制
* Server auth using Basic with user 'MichaelDrogalis'
代码语言:txt
复制
> GET /derekerdmann/lunch_call.git/info/refs?service=git-receive-pack HTTP/1.1
代码语言:txt
复制
Authorization: Basic XXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
代码语言:txt
复制
User-Agent: git/1.7.4.3282.g844cb
代码语言:txt
复制
Host: github.com
代码语言:txt
复制
Accept: */*
代码语言:txt
复制
Pragma: no-cache
代码语言:txt
复制
代码语言:txt
复制
< HTTP/1.1 401 Authorization Required
代码语言:txt
复制
< Server: nginx/1.0.4
代码语言:txt
复制
< Date: Thu, 15 Sep 2011 22:44:41 GMT
代码语言:txt
复制
< Content-Type: text/plain
代码语言:txt
复制
< Connection: keep-alive
代码语言:txt
复制
< Content-Length: 55
代码语言:txt
复制
* Authentication problem. Ignoring this.
代码语言:txt
复制
< WWW-Authenticate: Basic realm="GitHub"
代码语言:txt
复制
* The requested URL returned error: 401
代码语言:txt
复制
* Closing connection #0
代码语言:txt
复制
* Couldn't find host github.com in the _netrc file; using defaults
代码语言:txt
复制
* About to connect() to github.com port 443 (#0)
代码语言:txt
复制
*   Trying 207.97.227.239... * 0x23cb740 is at send pipe head!
代码语言:txt
复制
* Connected to github.com (207.97.227.239) port 443 (#0)
代码语言:txt
复制
* successfully set certificate verify locations:
代码语言:txt
复制
*   CAfile: C:\Program Files (x86)\Git/bin/curl-ca-bundle.crt
代码语言:txt
复制
  CApath: none
代码语言:txt
复制
* SSL re-using session ID
代码语言:txt
复制
* SSL connection using AES256-SHA
代码语言:txt
复制
* old SSL session ID is stale, removing
代码语言:txt
复制
* Server certificate:
代码语言:txt
复制
*        subject: 2.5.4.15=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.
代码语言:txt
复制
3.6.1.4.1.311.60.2.1.2=California; serialNumber=C3268102; C=US; ST=California; L
代码语言:txt
复制
=San Francisco; O=GitHub, Inc.; CN=github.com
代码语言:txt
复制
*        start date: 2011-05-27 00:00:00 GMT
代码语言:txt
复制
*        expire date: 2013-07-29 12:00:00 GMT
代码语言:txt
复制
*        subjectAltName: github.com matched
代码语言:txt
复制
*        issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert High Ass
代码语言:txt
复制
urance EV CA-1
代码语言:txt
复制
*        SSL certificate verify ok.
代码语言:txt
复制
* Server auth using Basic with user 'MichaelDrogalis'
代码语言:txt
复制
> GET /derekerdmann/lunch_call.git/info/refs HTTP/1.1
代码语言:txt
复制
Authorization: Basic xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
代码语言:txt
复制
User-Agent: git/1.7.4.3282.g844cb
代码语言:txt
复制
Host: github.com
代码语言:txt
复制
Accept: */*
代码语言:txt
复制
Pragma: no-cache
代码语言:txt
复制
代码语言:txt
复制
* The requested URL returned error: 403
代码语言:txt
复制
* Expire cleared
代码语言:txt
复制
* Closing connection #0
代码语言:txt
复制
error: The requested URL returned error: 403 while accessing https://MichaelDrog
代码语言:txt
复制
alis@github.com/derekerdmann/lunch_call.git/info/refs
代码语言:txt
复制
代码语言:txt
复制
fatal: HTTP request failed

这些是我拥有的git和curl版本:

代码语言:txt
复制
C:\Users\XPherior>git --version
代码语言:txt
复制
git version 1.7.4.msysgit.0
代码语言:txt
复制
代码语言:txt
复制
C:\Users\XPherior>curl --version
代码语言:txt
复制
curl 7.21.7 (amd64-pc-win32) libcurl/7.21.7 OpenSSL/0.9.8r zlib/1.2.5
代码语言:txt
复制
Protocols: dict file ftp ftps gopher http https imap imaps ldap pop3 pop3s rtsp
代码语言:txt
复制
smtp smtps telnet tftp
代码语言:txt
复制
Features: AsynchDNS GSS-Negotiate Largefile NTLM SSL SSPI libz

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档