Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

Bitbucket authentication issues



  • I'm trying to set up a demo of your software to show to my company. I've used your software for years but in the past I've used GitHub. Now I'm trying to use a Bitbucket Server and it is getting a 401 when trying to access the repository.

    Before I go any further I'm using 2025.5 (Build 14).

    When I first set it up I used the standard bitbucket path. The dropdowns worked beautifully to pick the repository in question but when it tried to clone it got a 401 error. After browsing your forums I tried setting up a generic git repository and I get the same result when it tries to clone. I'm hoping someone can either provide more information (like are are there version limitations on support) or give me some idea of how I can troubleshoot further. I'd hate for the company to miss out on this great product for something like this.


  • inedo-engineer

    Hi @brandon_owensby_2976 ,

    Thanks for the feedback. Based on what you described, it sounds like...

    • BitBucket Server API is working fine
    • Git API is not working due to a failed/failing authentication challenge

    You were able to confirm this with the "Generic Git Repository" also not working. If you were to do a curl -I -u USERNAME;APIKEY https:/.../.git you would most certainly get a 401 response as well.

    Anyway that's where I would start -- try to figure out why the Git API is not accepting the credentials. It's most likely related to permissions on theh key, but it's really hard to say... just a guess.

    Thankks,
    Steve



  • Hi @stevedennis ,
    Thank you for the response. I tried the curl you mentioned and it actually prompts me for a host password for user. Of course entering this in doesn't help. I even had an admin check and see if HTTP(s) SCM hosting is enabled on our server, and it is. We do have an older version of Bitbucket Server and here soon we are supposed to be migrating to a new one. If I don't figure this out before then I will be curious if the new server makes a difference. I haven't see anything about what versions you do or don't support.

    Thank you,
    Brandon


  • inedo-engineer

    Hi @brandon_owensby_2976 ,

    It sounds like you're on the right rack with troubleshooting; the issue is definitely on the server-side in this case, so I asked ChatGPT. Who knows if any of this is accurate, but...

    This is a very common situation with older versions of Bitbucket Server (especially pre-6.x / pre-7.x era, but even up to some 7.x versions in certain setups).

    The REST API (e.g. /rest/api/1.0/...) and the Git Smart HTTP protocol (/scm/.../info/refs, /git-upload-pack, etc.) are handled by different authentication filters in Bitbucket Server.

    Most likely you're using a Personal Access Token / HTTP Access Token (most frequent cause in older versions). In many Bitbucket Server versions (especially ≤ 7.17–7.21), HTTP access tokens were designed mainly for REST API and did not work reliably (or at all) for Git over HTTPS in many cases.

    As a workaround , you need to use a real username + password (or username + app password if 2FA is on) for Git operations

    We've seen similar in really old version of ADO, GitHub, etc, where API tokens wouldn't work for Git.

    Anyway, I would try that - at least from the curl side of things. And maybe upgrading will help as well. If it works, then you'll likely only be able to use a Generic Git repository with a real username/password -- and just create a special builds user which effectiveely acts like an APi key.

    Cheers,
    Steve


Log in to reply
 

Inedo Website HomeSupport HomeCode of ConductForums GuideDocumentation