I'm runing Stash 3.2.2 and Bamboo 5.7.2 on Linux and, in general, they work together well. However, for branch builds, I am frequently getting problems where builds do not start due to Bamboo forgetting the authentication to Stash. Is there any way to stop this?
e.g. #1 "Errors getting changes for DEV-FPM3-11 - This error may have occurred due to an authentication issue with Stash. Save the repository configuration to refresh the authentication details". However, when I try to save the repo config, the drop-down repository box just has a spinning icon next to it, and never displays a repository. If I just blindly click the "Save Repository" button, the issue is not cleared and I get the following error:
e.g. #2 "Plan DEV-FPM3-11 Started but a fatal error occurred" In the logs, I see the error: java.lang.IllegalArgumentException: Unknown Repository Definition 18448388
Hello,
If you are running Bamboo and Stash and you have set up repositories in Bamboo by selecting Stash as Repository host, as mentioned earlier in this thread:
Since you have removed SSH keys in Stash, it might be the case you have deleted keys that have been generated by Bamboo when configuring the repository. If this is the case, yes, it will be required to go through the repositories set up in Bamboo and hit the Save button as a new key-pair will be generated.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
Hello,
Instead of using Stash as Repository host, you could select Git instead. After that you could set up your Stash repositories and Bamboo to run from a SSH key-pair defined by you.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are experiencing similar symptoms with Bamboo using Stash as its git repository (trusted apps, 2-legged Oauth). I'm not sure if they come from exactly the same root cause. I've got a support ticket open and will make sure this page is mentioned. In our case there's also a mass credential expiration in the wee hours of the morning and a whole slew authentication errors. It is nearly unique in my experience to hear a software vendor say "We can't make our company's code repository work reliably with our build tool. You should seriously consider patronizing one of our competitors."
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Todd, I have noticed your comment on my previous reply to this Answer and, just for clarification, in Bamboo when setting up a repository, you have several options you can select from as *Repository host*: - Stash - Bitbucket - Git - GitHub - Mercurial - CVS - Subversion - Perforce And when referring to select Git as repository host, this was related to the inquire "How could I get Bamboo to use just one account in Stash (always the same one)?" where you could setup Stash repositories in Bamboo as Git (*Repository host*) and use a pre-defined SSH keypair. PS. Please, notice Git is not GitHub. Could you please elaborate on your statement "We can't make our company's code repository work reliably with our build tool. You should seriously consider patronizing one of our competitors.", please? — Kind regards, Rafael P. Sperafico Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for the clarification. That seemed awfully strange.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What's the logic of tying a bamboo linked (or otherwise) repository to the *user* who created it? That seemingly unnecessarily confuses authorization as it means people can use a repository without knowing that it is tied to a given user who might (at any time) choose to delete the public key from their stash account or who may leave the company, etc). Why not allow the use of a statically configured key pair (or even a shared credential as the documentation here: https://confluence.atlassian.com/stash/ssh-access-keys-for-system-use-563609615.html#SSHaccesskeysforsystemuse-UsingSSHkeystoallowaccesstoStashrepositories) would indicate is supposed to work but as far as I can tell does not). Additionally, why on earth do the generated keys just say "http(s)://bamboo.example.com" and not mention the linked repository they belong to **at all**? How is that intended to be useful? As a further issue why do the public key entries not get deleted when the linked repository that generated them get deleted? (I'm happy to file issues for any/all of these if that's what makes sense.)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
How could I get Bamboo to use just one account in Stash (always the same one)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
So... we removed some bamboo ssh keys from a few user accounts in stash, not knowing what generated those. Now, several hundreds of branch build plans are blocked cause apparently they were the source of those keys (lesson learned). How do we refresh those repository configurations en mass? Not looking forward to having to click through 2 pages over 600 times....... surely there must be a more convenient way to do this?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
Just to give an update in here, this issue was related to ports used by Stash not accessible by Bamboo.
Please, refer to ResponseConnectTimeoutException: The host did not accept the connection within timeout of 1500 ms documentation for further information.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
i've done that and i'm still getting errors:
cp-test - cptest : Plan 'CPTES-CPTES' could not be started. Exception: java.lang.RuntimeException: com.atlassian.bamboo.plugins.stash.repository.StashRepositoryException: com.atlassian.bamboo.repository.RepositoryException: com.atlassian.bamboo.plugins.git.GitCommandException: command /usr/bin/git ls-remote ssh://28b746c0-4473-44c6-904c-bdccc39795bb@127.0.0.1:49075/cyb/cybertests.git failed with code 128. Working directory was [.]., stderr:
[/opt/atlassian/bamboo-install/atlassian-bamboo-5.7.2/temp/bamboo-ssh.daffe1b7.sh: line 2: system.git.executable.ssh: command not found, fatal: Could not read from remote repository., , Please make sure you have the correct access rights, and the repository exists.]
cp-test - cptest › CPTES-CPTES-1 : Errors getting changes for CPTES-CPTES-1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Richard,
Thank you for your question.
I would kindly suggest you on recreating the application link between Bamboo and Stash as per following:
When using Bamboo 5.6+ Stash 3.2+ newly created application link with default settings:
Will result in application link created with:
In Stash, please make sure you have "Stash administration >> Settings >> Server Settings >> SSH access" configured as per following:
[x] SSH enabled
[x] SSH access keys enabled
SSH Port: 7999
Let me explain briefly how we authenticate when Bamboo works with Stash repositories.
Please, make sure the user saving repository configuration in Bamboo has permissions to the repository in Stash.
If you find this answer useful, I would kindly ask you to accept it so the same will be visible to others who might be facing the same issue you have inquired.
Thank you for your understanding.
—
Kind regards,
Rafael P. Sperafico
Atlassian Support
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
We are also having these issues now. None of our branch changes in stash are triggering any Bamboo builds now. Could use an answer here.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.