Hello,
We've been using BitBucket for our git repository and Jenkins (v2.204) for our CI build engine. This month our builds began failing with this error message:
10:41:16 stderr: remote: Because your Atlassian account admin requires single sign-on, you'll need to authenticate with an app password. Create an app password at https://bitbucket.org/account/admin/app-passwords
I have created an "app password" for our CI user account and I attempted to configure that new pwd into Jenkins but now our builds are failing with this message:
10:52:35 using GIT_ASKPASS to set credentials BitBucket app password for solu-dev 10:52:35 > git fetch --tags --progress https://bitbucket.org/XXX/solu-core.git +refs/heads/*:refs/remotes/origin/* 10:52:36 ERROR: Error fetching remote repo 'origin' 10:52:36 hudson.plugins.git.GitException: Failed to fetch from https://bitbucket.org/XXX/solu-core.git 10:52:36 at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:894)
So clearly, I didn't configure Jenkins properly. Does anyone know how it should be done?
Thanks, Bryan
https://stackoverflow.com/questions/39886995/how-to-access-bitbucket-using-app-password
https://<Your_Account_Name>:<App_Password>@bitbucket.org/<Your_Account_Name>/<Repo_Name>.git
@Bryan Basham where to change from https to git
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you have already cloned a repo using `https` then you will need to drop that repo directory and rebuild it using a `git` URL pattern. Make sure to save any local changes to the remote before dropping the old local repo.
You can find the clone operation on the main page for the repo in BitBucket.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I switched from the `https` to `git` scheme and installed a private key. That solved it.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I too created an App Password and it didn't work. However, I only changed from the "https" scheme to the "git" scheme and still retained my App Password and it worked.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I may have figured this out completely accidentally. Before the change I was using the account name (account@domain.tld) with the account password. I tried changing only the password to an app password, but as everyone here has reported, that doesn't work.
I removed the account name and used the "Username" value shown under account settings, which allowed Jenkins to access the repos again.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Mike Banducci Thank you! Changing from using the email as the username to the "Username" as you put it got the app password working.
I was previously trying to use an OAuth consumer in a job as support for account password ended last week, but for some reason it wasn't recognised as valid credentials (it works with the Bitbucket Branch Plugin in an org). Using the app password I configured months ago with the right username works.
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.