I’m using Octopus version 2022.1 (Build 2584)
We use cloud bitbucket to manage our source.
I’m trying to setup Version Control and I’m getting the following message:
The Git Credential setup does not allow username to be blank. I had to put a user name and the password field does have the app-password.
Does Octopus version control support bitbucket cloud?
Good afternoon @binh.au,
Thank you for contacting Octopus Support and sorry you are running into issues when trying to set up Configuration as Code.
Octopus Config as Code only supports Git repositories, unfortunately. From the error message, you are getting this looks like an issue with BitBucket and it not supporting passwords for Git authentication anymore:
Bitbucket Cloud recently stopped supporting account passwords for Git authentication
From the error message, it looks like you can create app passwords in your personal settings in your Atlassian account. I am not familiar with BitBucket but I imagine you can possibly create a password in your personal settings that is associated with an application (kind of like an API key). I had a quick read of the link in the error message too and it mentions something about BitBucket no longer supporting usernames for email addresses for app passwords, it mentions how you can correct this.
You can then use these new credentials in your Octopus Git Credential setup?
Let me know what you find and if this helps at all,
I have been discussing this with the rest of the team and we do think it’s a little odd this is not working.
I am currently in the process of trying to get a CaC project converted over using BitBucket so I will let you know how this goes. If it does turn out to be a bug on our end I can send this over to our Config As Code team to have a look at.
I will update you as soon as I have some more information for you,
Found how to make it work.
In “Version Control Settings”, for Authentication. You have to select username/password and put your bitbucket username and bitbucket App-Password.
Not sure if it’s a bug, selecting Authentication>library>git credential with the same bitbucket username and bitbucket App-Password result in the following error message:
- Remote repository returned an error: Invalid credentials
Thanks for posting that up, I was halfway through testing this and was just about to generate an app password to put in the Version control settings of a project.
The Git page in the Octopus UI I couldn’t edit as I had already set up my GitHub account on that page and all I could do there was clear the cache.
I am now going to spin up a new test instance with the same version and see if I experience the same as you, if I do I will pass this on to our engineers as it would suggest a bug.
I will let you know what I find but it’s good you got this working in the meantime.
So finally got this working…initially I got the same as you, so I created my Bitbucket app password and put my username and password (my app password) in for the credentials in the project version control settings. This did work and I was able to create my version control in the BitBucket repo.
I will note that I was getting the same error message you were until I made sure I used my Bitbucket username - located on the bitbucket admin page, and not my email address which I had been using as my username!
I then went over and tried the same credentials in the Library>Git Credential section of the Octopus UI. I got the same error message as you did.
I then tried creating a new app password in Bitbucket and put that in the Git Credential section. This saved. I then tried using that saved credential in another project and it did work.
This would make sense, BitBucket is seeing two apps that are trying to connect to it, even though it’s still just Octopus. I don’t know how our code works here but there must be different API calls for if you use the built-in GIT account to if it uses an account that you fill in on the Project version control page.
I will get this to our engineers and see if we can improve on this but for now, if you can try generating a new app password for me in Bitbucket, putting that in the Git Credentials page, save it and use that saved credential in a test project to see if it allows you to convert the project to Config As Code.
I look forward to hearing from you,
One more post just to say I have tested this with GitHub and you can use the same access token for the Git Credentials and putting the account details in manually so this just seems to be a querk associated with BitBucket. I will attach some screenshots so other users can see this if they happen to experience the same issue.
Unfortunately, I do not think this is a bug on our end and as there is a pretty easy workaround I don’t think our engineers will be able to look into this issue.
If you do manage to get the Git Credentials working though you would only need one app password as you can just select the Git Credential when you are converting the project over to CaC, you should not need to enter one in manually.
Hopefully, all this helps, I will stop spamming your inbox now but I just wanted to get this info out to you.
Hi, yes I got Git Credential working. Not sure why it did not work first time. Thank you for looking into the issue.
Thanks for confirming everything is now working, please reach out if you have any other questions about CaC or Octopus in general, we love to help here at Octopus Support!
This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.