Cannot Git Clone: fatal: HTTP request failed 400 error

I am configuring git with Stash for the first time and I am unable to clone the repository that I have created. I have done 

git config --global user.name 
git config --global user.email
 

The log file of the git clone show:

 

trace: run_command: 'git-remote-https' 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git' 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git'

Initialized empty Git repository in /home/cmcnaug1/cddis-stats/.git/

trace: run_command: '/usr/libexec/openssh/gnome-ssh-askpass' 'Password: '

* Couldn't find host git.earthdata.nasa.gov in the .netrc file; using defaults

* About to connect() to git.earthdata.nasa.gov port 443 (#0)

*   Trying 198.118.243.114... * Connected to git.earthdata.nasa.gov (198.118.243.114) port 443 (#0)

* Initializing NSS with certpath: sql:/etc/pki/nssdb

*   CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate:

*  subject: CN=git.earthdata.nasa.gov,serialNumber=29-07-1958,businessCategory=Government Entity,O=NASA (National Aeronautics and Space Administration),incorporationCountry=US,L=Greenbelt,ST=Maryland,C=US

*  start date: Aug 20 18:45:56 2014 GMT

*  expire date: Oct 02 02:54:07 2016 GMT

*  common name: git.earthdata.nasa.gov

*  issuer: CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US

> GET /scm/cddisstats/cddis-stats.git/info/refs?service=git-upload-pack HTTP/1.1

User-Agent: git/1.7.1

Host: git.earthdata.nasa.gov

Accept: */*

Pragma: no-cache

 

< HTTP/1.1 401 Unauthorized

< Date: Thu, 22 Oct 2015 18:34:21 GMT

< Server: Apache-Coyote/1.1

< X-AREQUESTID: @UAXEPFx874x1199104x6

< X-ASEN: SEN-2367362

< X-XSS-Protection: 1; mode=block

< X-Frame-Options: SAMEORIGIN

< X-Content-Type-Options: nosniff

< WWW-Authenticate: Basic realm="Atlassian Stash"

< Content-Length: 0

< Connection: close

< Content-Type: text/plain; charset=UTF-8

* Expire cleared

* Closing connection #0

* Issue another request to this URL: 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git/info/refs?service=git-upload-pack'

* Couldn't find host git.earthdata.nasa.gov in the .netrc file; using defaults

* About to connect() to git.earthdata.nasa.gov port 443 (#0)

*   Trying 198.118.243.114... * Connected to git.earthdata.nasa.gov (198.118.243.114) port 443 (#0)

*   CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate:

*  subject: CN=git.earthdata.nasa.gov,serialNumber=29-07-1958,businessCategory=Government Entity,O=NASA (National Aeronautics and Space Administration),incorporationCountry=US,L=Greenbelt,ST=Maryland,C=US

*  start date: Aug 20 18:45:56 2014 GMT

*  expire date: Oct 02 02:54:07 2016 GMT

*  common name: git.earthdata.nasa.gov

*  issuer: CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US

* Server auth using Basic with user 'cmcnaught92'

> GET /scm/cddisstats/cddis-stats.git/info/refs?service=git-upload-pack HTTP/1.1

User-Agent: git/1.7.1

Host: git.earthdata.nasa.gov

Accept: */*

Pragma: no-cache

 

< HTTP/1.1 401 Unauthorized

< Date: Thu, 22 Oct 2015 18:34:21 GMT

< Server: Apache-Coyote/1.1

< X-AREQUESTID: @UAXEPFx874x1199105x6

< X-ASEN: SEN-2367362

* Authentication problem. Ignoring this.

< WWW-Authenticate: Basic realm="Atlassian Stash"

< Content-Length: 0

< Connection: close

< Content-Type: text/plain; charset=UTF-8

* The requested URL returned error: 401

* Closing connection #0

* Couldn't find host git.earthdata.nasa.gov in the .netrc file; using defaults

* About to connect() to git.earthdata.nasa.gov port 443 (#0)

*   Trying 198.118.243.114... * Connected to git.earthdata.nasa.gov (198.118.243.114) port 443 (#0)

*   CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate:

*  subject: CN=git.earthdata.nasa.gov,serialNumber=29-07-1958,businessCategory=Government Entity,O=NASA (National Aeronautics and Space Administration),incorporationCountry=US,L=Greenbelt,ST=Maryland,C=US

*  start date: Aug 20 18:45:56 2014 GMT

*  expire date: Oct 02 02:54:07 2016 GMT

*  common name: git.earthdata.nasa.gov

*  issuer: CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US

* Server auth using Basic with user 'cmcnaught92'

> GET /scm/cddisstats/cddis-stats.git/info/refs HTTP/1.1

User-Agent: git/1.7.1

Host: git.earthdata.nasa.gov

Accept: */*

Pragma: no-cache

 

* The requested URL returned error: 400 Bad Request

* Closing connection #0

error: The requested URL returned error: 400 Bad Request while accessing https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git/info/refs

 

fatal: HTTP request failed

[cmcnaug1@gs690-cddis1 ~]$ set GIT_CURL_VERBOSE=1

[cmcnaug1@gs690-cddis1 ~]$ source git-debug-clone https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git

trace: built-in: git 'clone' '--verbose' 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git'

trace: run_command: 'git-remote-https' 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git' 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git'

Initialized empty Git repository in /home/cmcnaug1/cddis-stats/.git/

trace: run_command: '/usr/libexec/openssh/gnome-ssh-askpass' 'Password: '

* Couldn't find host git.earthdata.nasa.gov in the .netrc file; using defaults

* About to connect() to git.earthdata.nasa.gov port 443 (#0)

*   Trying 198.118.243.114... * Connected to git.earthdata.nasa.gov (198.118.243.114) port 443 (#0)

* Initializing NSS with certpath: sql:/etc/pki/nssdb

*   CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate:

*  subject: CN=git.earthdata.nasa.gov,serialNumber=29-07-1958,businessCategory=Government Entity,O=NASA (National Aeronautics and Space Administration),incorporationCountry=US,L=Greenbelt,ST=Maryland,C=US

*  start date: Aug 20 18:45:56 2014 GMT

*  expire date: Oct 02 02:54:07 2016 GMT

*  common name: git.earthdata.nasa.gov

*  issuer: CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US

> GET /scm/cddisstats/cddis-stats.git/info/refs?service=git-upload-pack HTTP/1.1

User-Agent: git/1.7.1

Host: git.earthdata.nasa.gov

Accept: */*

Pragma: no-cache

 

< HTTP/1.1 401 Unauthorized

< Date: Thu, 22 Oct 2015 18:41:44 GMT

< Server: Apache-Coyote/1.1

< X-AREQUESTID: @UAXEPFx881x1199524x6

< X-ASEN: SEN-2367362

< X-XSS-Protection: 1; mode=block

< X-Frame-Options: SAMEORIGIN

< X-Content-Type-Options: nosniff

< WWW-Authenticate: Basic realm="Atlassian Stash"

< Content-Length: 0

< Connection: close

< Content-Type: text/plain; charset=UTF-8

* Expire cleared

* Closing connection #0

* Issue another request to this URL: 'https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git/info/refs?service=git-upload-pack'

* Couldn't find host git.earthdata.nasa.gov in the .netrc file; using defaults

* About to connect() to git.earthdata.nasa.gov port 443 (#0)

*   Trying 198.118.243.114... * Connected to git.earthdata.nasa.gov (198.118.243.114) port 443 (#0)

*   CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate:

*  subject: CN=git.earthdata.nasa.gov,serialNumber=29-07-1958,businessCategory=Government Entity,O=NASA (National Aeronautics and Space Administration),incorporationCountry=US,L=Greenbelt,ST=Maryland,C=US

*  start date: Aug 20 18:45:56 2014 GMT

*  expire date: Oct 02 02:54:07 2016 GMT

*  common name: git.earthdata.nasa.gov

*  issuer: CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US

* Server auth using Basic with user 'cmcnaught92'

> GET /scm/cddisstats/cddis-stats.git/info/refs?service=git-upload-pack HTTP/1.1

User-Agent: git/1.7.1

Host: git.earthdata.nasa.gov

Accept: */*

Pragma: no-cache

 

< HTTP/1.1 401 Unauthorized

< Date: Thu, 22 Oct 2015 18:41:44 GMT

< Server: Apache-Coyote/1.1

< X-AREQUESTID: @UAXEPFx881x1199525x6

< X-ASEN: SEN-2367362

* Authentication problem. Ignoring this.

< WWW-Authenticate: Basic realm="Atlassian Stash"

< Content-Length: 0

< Connection: close

< Content-Type: text/plain; charset=UTF-8

* The requested URL returned error: 401

* Closing connection #0

* Couldn't find host git.earthdata.nasa.gov in the .netrc file; using defaults

* About to connect() to git.earthdata.nasa.gov port 443 (#0)

*   Trying 198.118.243.114... * Connected to git.earthdata.nasa.gov (198.118.243.114) port 443 (#0)

*   CAfile: /etc/pki/tls/certs/ca-bundle.crt

  CApath: none

* SSL connection using TLS_DHE_RSA_WITH_AES_256_CBC_SHA

* Server certificate:

*  subject: CN=git.earthdata.nasa.gov,serialNumber=29-07-1958,businessCategory=Government Entity,O=NASA (National Aeronautics and Space Administration),incorporationCountry=US,L=Greenbelt,ST=Maryland,C=US

*  start date: Aug 20 18:45:56 2014 GMT

*  expire date: Oct 02 02:54:07 2016 GMT

*  common name: git.earthdata.nasa.gov

*  issuer: CN=Entrust Certification Authority - L1E,OU="(c) 2009 Entrust, Inc.",OU=www.entrust.net/rpa is incorporated by reference,O="Entrust, Inc.",C=US

* Server auth using Basic with user 'cmcnaught92'

> GET /scm/cddisstats/cddis-stats.git/info/refs HTTP/1.1

User-Agent: git/1.7.1

Host: git.earthdata.nasa.gov

Accept: */*

Pragma: no-cache

 

* The requested URL returned error: 400 Bad Request

* Closing connection #0

error: The requested URL returned error: 400 Bad Request while accessing https://cmcnaught92@git.earthdata.nasa.gov/scm/cddisstats/cddis-stats.git/info/refs

 

fatal: HTTP request failed

3 answers

This widget could not be displayed.

Is it asking you for a password at any point?

This widget could not be displayed.

Yes it does

This widget could not be displayed.

It seems like it's saying you don't have the correct permissions on Bitbucket Server (Stash).  Which is weird if you created the repo.  Are you using the same account to authenticate as you used to create the repo?  Maybe double check the permissions on the repo itself in the Stash web UI?

Sorry for the delay, I am restricted in how frequently I can post on here. Yes I am using the same account and I have double checked the permissions. I am also now blocked by a CAPTCHA and i'm not sure how to clear it.

I upvoted your question, which may help with your ability to post more regularly. You should be able to clear the CAPTCHA by logging into the web interface. That would prevent the git authentication from working, I think.

I logged into the Web Interface: git.earthdata.nasa.gov, then logged out and tried to do a git clone again and it is still saying my Stash account has been marked as requiring a CAPTCHA to be solved before I may login again.

That's strange. Are you an admin on the Stash instance?

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Friday in Bitbucket

What is your #1 piece of advice to new users getting started using Bitbucket?

Hello Community! My name is Claire Maynard, and I’m a Product Marketing Manager on the Bitbucket team. I’m interested in hearing what advice or tips you have for new users getting started on ...

125 views 5 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you