I'm trying to use the new Stash repositories feature in bamboo (as of 5.5 I believe). This is more important now that the legacy stash support is removed from 5.7. The problem I am having is that I want to create tags on a repository on successful completion of a stage. Originally I did this by using a script, the git repository URL variable, and a _netrc file to provide the security settings. Now if I use the new stash repositories, everything is ssh, so I need a copy of the ssh key that bamboo is using. But there doesn't seem to be any way to get that. The only thing I can think of is to also store the https url for a repository in a variable, which seems like a maintenance problem. Like what happens when someone updates the repository but not the https URL, then we start tagging the wrong repo.
Anyone have a way to do this?