Wrong Git Clone URL When Using Proxy

Troubleshooting Git

On this page

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When accessing a repository, the Git clone URL (default URL) should use the Stash URL (example: http://localhost:7990):

git clone http://USER@127.0.0.1:7990/git/PROJECT/REPOSITORY.git

This is not the case when Stash is behind a proxy.

Cause

The proxy is translating the URL to a local URL, so Stash uses that address to show the clone URL. 

(info) The bug report describing this behavior in more detail can be found here: STASH-2535 - Getting issue details... STATUS

Resolution

Update the connector settings in  <Stash Installation Directory>/conf/server.xml file to reflect the proxy settings from:

 

         <Connector port="7990" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   compression="on"
                   compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"/>

To:

         <Connector port="7990" protocol="HTTP/1.1"
                   connectionTimeout="20000"
                   useBodyEncodingForURI="true"
                   redirectPort="8443"
                   compression="on"
				   proxyName="myproxy.company.com"
				   proxyPort="PORT_NUMBER"
                   compressableMimeType="text/html,text/xml,text/plain,text/css,application/json,application/javascript,application/x-javascript"/>

And restart Stash.

 

 

Last modified on Feb 26, 2016

Was this helpful?

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