GoCD with Bitbucket Cloud Issue

17 views
Skip to first unread message

Wesley Sonner

unread,
Oct 23, 2020, 3:44:22 PM10/23/20
to go-cd
I hope this is the right forum, please forgive me if it isn't. We use GoCD for our CI/CD with git on Bitbucket cloud. Recently some brilliant dude (me) removed the user in BB whose user and SSH keys were being used to run all the git commands against our BB repo. So now nothing works. We're looking for advice for reinstating a working SSH key and user to get our builds working again.  Any advice would be so appreciated. 

Jason Smyth

unread,
Oct 25, 2020, 11:30:10 AM10/25/20
to go-cd
Hello,

I'm not familiar with Bitbucket cloud specifically but it seems to me you should have a few options here:

  1. Undelete the deleted user.
    • I have no idea if Bitbucket supports this or not but, if so, it is almost certainly the easiest option.
  2. Recreate the deleted user:
    • Make sure that the username is exactly the same as the original.
    • Extract a copy of the user's public key from the GoCD server and/or an Agent that used to work.
    • Upload the public key to the recreated user's Bitbucket profile.
  3. Recreate a working configuration:
    • Create a new user (or pick an existing one). Ideally this user should be dedicated to GoCD and not associated with any individual in the organization.
    • Create a keypair for the new user.
    • Install the private key on all GoCD servers and Agents that need access to the Bitbucket repository.
    • Update the Material configuration of all Pipelines that access the Bitbucket repository to use the new username.
Again, I am not familiar with Bitbucket, but these concepts should apply anywhere that SSH key authentication and authorization are being used.

Hope this helps,
Jason


Reply all
Reply to author
Forward
0 new messages