Does Stash have Go support?

George Jiglau Jul 21, 2014

Can I make Stash provide Go packages?

For example, I'd like import code as follows:

import ""

This page describes how to add such support:

4 answers

5 votes
Dhawal Patel Oct 30, 2014

Don't like the .git suffix in folders. Stash should add the go meta tag in response.

chaishushan Nov 24, 2014

I also don't like .git and /scm/.

1 votes
Tim Pettersen Jul 22, 2014

Hi George,

Yep! You can. You just need to use the HTTP/S URL in your import statement, i.e.:

import "{hostname}/scm/{project_key}/{repository_slug}.git"

For example, to import the repository "newmath" from the project "TEST" on I used:

import ""

There does seem to be a deficiency in Go that prevents you from having ~ in the URL, which means you won't be able to use packages hosted in personal repositories (as they contain /~username/) but repositories hosted in projects work just fine.

GO nuts ;)



Peter Dalinis Oct 24, 2014

This solution does "work", but is far from desirable IMO. The scm in the path can be omitted. The problem is that all your directories will have .git in them as a suffix. It would be really nice to see Atlassian have real support using the http header solution.

chaishushan Nov 24, 2014

The good package path is: import "{hostname}/{project_key}/{repository_slug}"

Willie Walker Mar 30, 2015

The extra stuff required in the path when working with go projects in Atlasssian does indeed drive me nuts, so "GO nuts" is a perfect directive. ;-) Any chance we might see a stash improvement in this area soon?

Yvonnick Esnault Apr 15, 2015

"Any chance we might see a stash improvement in this area soon?" +1

0 votes
Peter Dalinis Oct 24, 2014
0 votes
Stefan Petrucev Jul 27, 2015

Further support for go get was added in Stash 3.8.0.

Kind regards,
Stefan Petrucev
Atlassian Stash

Suggest an answer

Log in or Register to answer