geting 400 error when trying to clone a repository from stash

error: The requested URL returned error: 400 while accessing https://user@stashserver.mydomain/scm/PR/app1.git/info/refs

I have stash(port7990) running behind apache.(port 80)
Apache is behind a hardware loadbalancer, SSL terminates at the hardware loadbalancer(ssl accelerator)

I can loginto the stash ui just find, all actions through the UI are working, just can check in, out, clone, push etc.

2 answers

1 accepted

2 votes

Hi Ronnie,

The 400 code (Bad Request) usually means that your git client version is trying to use the git 'dumb' HTTP protocol, which is not supported by Stash. Stash only supports the 'smart' HTTP protocol, which was introduced in git 1.6.6. Check the Stash logs; it should contain messages along the lines 'Stash received an invalid git request from host ....'.

If you're using a git client that is older than 1.6.6, please upgrade your client.

I finally found the logs for stash and noticed "git http-backend not a command"

I realized that I had compiled and installed git incorrectly. FML!

CentOS 6 comes with 1.6.6 so I chose to compile from source, didn't configure the build properly the first time.
All is well now.

Suggest an answer

Log in or Sign up to answer
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

2,026 views 1 5
Read article

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