Is it possible to provide anonymous access to a Stash hosted git repository?

Hi,

I would like to know if it is possible to provide anonymous access to a Stash hosted git repository? By anonymous access I mean connecting to the git repository without specifying a username and/or password.

3 answers

Hi Alexander,

This is currently not possible at the moment.

We are tracking this feature to be implemented here: https://jira.atlassian.com/browse/STASH-2565

I'd strongly suggest you to vote and comment on this case to raise its awareness and also add yourself as a watcher for following further updates.

Cheers!

1 vote

There is currently no way to do this, but there are workarounds involving using SSH.

In our CI setup, we have a passphraseless ssh keypair set up for the CI user on all the CI server/agents (we copy the same keypair to each agent, but if you want to you could create a separate one for each) .

We have created a user who has read-only permissions to the repositories we need CI to access and add the public key to the user in Stash.

Once this is set up, the CI server can use the ssh url to clone from and we do not need to specify a username and password. Ssh will automatically use the keypair in the CI users ~/.ssh directory to authenticate with stash.

The only gotcha is that if it is the first time the CI user has checked code out from stash, it will prompt the user to accept a previously unknown host certificate - the workaround for that is to manuall try and clone as the CI user first (on each agent, or copying over the ~/.ssh/known_hosts file to each agent) or to disable checking (a potential security issue (see http://askubuntu.com/questions/123072/ssh-automatically-accept-keys).

We advise consulting with your IT security staff to help and audit this approach for your site.

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Marketplace Apps

Tips on how to choose the best estimation method for your planning

Planning and grooming sessions all come with their own sets of rules. Team members meet to estimate stories or other work items, all according to an agreed-upon process. And with every session comes ...

71 views 0 11
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