1. Bitbucket
  2. Public Issue Tracker
  3. master
  4. Issues

Issues

Issue #5232 resolved

Authentication failed for any repo

Tao Sauvage
created an issue

Hello there, I don't want to seem retarded but since few days I can't do anything on my repo anymore.

When I want to clone, push or pull one of my repo, I've got a 'fatal: Authentication failed'

Here is my git config of one of my repo:

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    fetch = +refs/heads/*:refs/remotes/origin/*
    url = https://depierre@bitbucket.org/depierre/ag44pow4.git
[branch "master"]
    remote = origin
    merge = refs/heads/master
[http]
    postBuffer = 524288000

If for instance I try 'url = https://depierre:PASSWORD@bitbucket.org/depierre/ag44pow4.git' (of course PASSWORD was my real password) and if I use the command 'GIT_CURL_VERBOSE=1 git push origin master' I've got this:

* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 207.223.240.182...
* Connected to bitbucket.org (207.223.240.182) port 443 (#0)
* Connected to bitbucket.org (207.223.240.182) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL connection using AES256-SHA
* Server certificate:
*    subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=3928449; street=375 Alabama St Ste 325; postalCode=94110; C=US; ST=CA; L=San Francisco; O=Atlassian, Inc.; CN=bitbucket.org
*    start date: 2012-01
*    expire date: 2014-03
*    subjectAltName: bitbucket.org matched
*    issuer: C=US; O
*    SSL certificate verify ok.
> GET /depierre/ag44pow4.git/info/refs?service=git-receive-pack HTTP/1.1
User-Agent: git/1.8.0
Host: bitbucket.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 401 Unauthorized
< Server: nginx/1.0.6
< Date: Mon, 05 Nov 2012 18:22:05 GMT
< Transfer-Encoding: chunked
< WWW-Authenticate: Digest realm="Bitbucket.org HTTP", nonce="4ccbc66d6d139135662270c145a8eece", qop="auth", opaque="f519148d6feb0b6c8135f1eb9ecb2ac4"
< 
* Ignoring the response-body
* Connection #0 to host bitbucket.org left intact
* Issue another request to this URL: 'https://depierre:PASSWORD@bitbucket.org/depierre/ag44pow4.git/info/refs?service=git-receive-pack'
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* Re-using existing connection! (#0) with host bitbucket.org
* Connected to bitbucket.org (207.223.240.182) port 443 (#0)
* Server auth using Digest with user 'depierre'
> GET /depierre/ag44pow4.git/info/refs?service=git-receive-pack HTTP/1.1
Authorization: Digest username="depierre", realm="Bitbucket.org HTTP", nonce="4ccbc66d6d139135662270c145a8eece", uri="/depierre/ag44pow4.git/info/refs?service=git-receive-pack", cnonce="MDAyMzI0", nc=00000001, qop=auth, response="d9d6aaaa4e32a2546b4fb409de48d165", opaque="f519148d6feb0b6c8135f1eb9ecb2ac4"
User-Agent: git/1.8.0
Host: bitbucket.org
Accept: */*
Accept-Encoding: gzip
Pragma: no-cache

< HTTP/1.1 200 OK
< Server: nginx/1.0.6
< Date: Mon, 05 Nov 2012 18:22:06 GMT
< Content-Type: application/x-git-receive-pack-advertisement
< Transfer-Encoding: chunked
< 
* Connection #0 to host bitbucket.org left intact
Counting objects: 14, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (8/8), done.
Writing objects: 100% (9/9), 2.26 KiB, done.
Total 9 (delta 5), reused 0 (delta 0)
* Couldn't find host bitbucket.org in the .netrc file; using defaults
* About to connect() to bitbucket.org port 443 (#0)
*   Trying 207.223.240.182...
* connected
* Connected to bitbucket.org (207.223.240.182) port 443 (#0)
* successfully set certificate verify locations:
*   CAfile: /etc/ssl/certs/ca-certificates.crt
  CApath: none
* SSL re-using session ID
* SSL connection using AES256-SHA
* old SSL session ID is stale, removing
* Server certificate:
*    subject: businessCategory=Private Organization; 1.3.6.1.4.1.311.60.2.1.3=US; 1.3.6.1.4.1.311.60.2.1.2=Delaware; serialNumber=3928449; street=375 Alabama St Ste 325; postalCode=94110; C=US; ST=CA; L=San Francisco; O=Atlassian, Inc.; CN=bitbucket.org
*    start date: 2012-01
*    expire date: 2014-03
*    subjectAltName: bitbucket.org matched
*    issuer: C=US; O
*    SSL certificate verify ok.
> POST /depierre/ag44pow4.git/git-receive-pack HTTP/1.1
User-Agent: git/1.8.0
Host: bitbucket.org
Accept-Encoding: gzip
Content-Type: application/x-git-receive-pack-request
Accept: application/x-git-receive-pack-result
Content-Length: 2448

* upload completely sent off: 2448 out of 2448 bytes
< HTTP/1.1 401 Unauthorized
< Server: nginx/1.0.6
< Date: Mon, 05 Nov 2012 18:22:08 GMT
< Transfer-Encoding: chunked
* Authentication problem. Ignoring this.
< WWW-Authenticate: Digest realm="Bitbucket.org HTTP", nonce="8534b8004d73d2d137cecbdd3a29cf86", qop="auth", opaque="0d9213d329380eaa69b47db374c1b66e"
* The requested URL returned error: 401
* Closing connection #0
error: RPC failed; result=22, HTTP code = 401
fatal: The remote end hung up unexpectedly
fatal: The remote end hung up unexpectedly
Everything up-to-date

I've got the same result for clone and pull request. I also changed my password to a trivial one and it fails too.

Do you have any idea to help me?

Thank you.

Comments (30)

  1. Pavel Jetensky

    I have this problem, I am not behind proxy, it happens also when I turn my Firewall off. Command line git pull hangs for few minutes and when I quit it using Ctrd-D, console output is following: Couldn't find host bitbucket.org in the _netrc file; using defaults About to connect() to proxy 192.168.64.245 port 3128 (#0) Trying 192.168.64.245... * 0x6c1318 is at send pipe head! Expire cleared Timed out Failed connect to bitbucket.org:3128; No error * Closing connection #0 error: Failed connect to bitbucket.org:3128; No error while accessing https://pa vel_jetensky@bitbucket.org/XXXXXXX.git/info/refs?service=git- upload-pack fatal: HTTP request failed

    I was able to pull & push OK (on 11th Feb), it started failing on 12th February evening

  2. Pavel Jetensky

    So problem in my case was caused by having corporate proxy in git config. When I pulled outside the company from my home laptop, where proxy was not available, the problem occured and message that I have mentioned in my previous comment from 201-02-17 occured. When I edited my git config and removed the proxy, pull is now ok.

  3. Log in to comment