Unable to connect to Stash

Troubleshooting Git

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

The following appears when trying to clone the repository in Stash:

fatal: http://user@example.com:7990/scm/PROJECT/repo.git/info/refs not valid: is this a git repository?

Diagnosis

Certain combinations of git and libcurl don't cope with the response body Stash used to return up to version 2.0.3.

GIT VersionCurl versionWorks?
<= 1.7.12.27.19.7
1.7.12.37.19.7
1.8.0.27.19.7
1.7.12.37.28.1
1.8.0.27.28.1

This seems to particularly affect CentOS which ships with somewhat old versions of libcurl. E.g. CentOS 6.3 with curl-devel-7.19.7; CentOS 5.8 with curl-devel-7.15.5.

Workaround: Preferred: upgrade to Stash 2.0.3 or 2.1 or higher. If that isn't possible, please use a version of git that is known to work or compile git against a more recent version of libcurl.

Libcurl:

curl -OL http://curl.haxx.se/download/curl-7.28.1.tar.gz
tar xfz curl-7.28.1.tar.gz
cd curl-7.28.1
./configure --enable-http --prefix=/opt/curl-7.28.1
make
sudo make install

git:

make configure
./configure --prefix=/opt/git-1.8.0.2 --with-curl=/opt/curl-7.28.1
make
sudo make install

Cause

This is a combination of behaviour in Stash  STASH-2966 - Getting issue details... STATUS  with certain combinations of git and curl.

Workaround

Use Git Client version 1.7.12.2 or lower to connect to Stash.

Resolution

Upgrade to Stash 2.0.3+ that has fixed the bug.

Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.