Wrong Git Clone URL When Using Proxy
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.
The bug report describing this behavior in more detail can be found here: - STASH-2535Getting issue details... STATUS
Resolution
<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.