Unable to push changes to the repository in Bitbucket Server with insufficient permission error over HTTPS URL

Still need help?

The Atlassian Community is here for you.

Ask the community


Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

A user with write permissions on the Project and Repository is unable to push to the repository in Bitbucket Server with insufficient permission error over HTTPS URL.

In the git client machine, the below error occurs.



In atlassian-bitbucket.log, the below error occurs.

2023-09-28 08:38:37,964 INFO  [http-nio-7990-exec-25] @1AYLAQJx518x4026089x0 10.20.30.40,50.60.70.80 "GET /scm/xyz/abc.git/info/refs HTTP/1.1" c.a.c.m.a.ApplicationServiceGeneric Invalid credentials for user username in directory Active Directory server (229377), aborting
2023-09-28 08:38:37,968 DEBUG [http-nio-7990-exec-25] @1AYLAQJx518x4026089x0 10.20.30.40,50.60.70.80 "GET /scm/xyz/abc.git/info/refs HTTP/1.1" c.a.s.i.auth.DefaultCaptchaService username: Updated failed authentication attempts from 0 to 1
2023-09-28 08:38:37,968 DEBUG [http-nio-7990-exec-25] @1AYLAQJx518x4026089x0 10.20.30.40,50.60.70.80 "GET /scm/xyz/abc.git/info/refs HTTP/1.1" c.a.s.i.a.DefaultAuthenticationService username: Authenticator 'com.atlassian.bitbucket.server.bitbucket-authentication:crowdHttpAuthHandler' rejected the authentication attempt
2023-09-28 08:38:37,968 DEBUG [http-nio-7990-exec-25] @1AYLAQJx518x4026089x0 10.20.30.40,50.60.70.80 "GET /scm/xyz/abc.git/info/refs HTTP/1.1" c.a.s.i.s.s.PluginAuthenticationProvider username: Authentication failed; bad credentials

Environment

Bitbucket 7.6+

Diagnosis


Enable git client level debug logging.

For HTTP/HTTPS URL:

  If the git client is on a Linux machine:

    export GIT_TRACE_PACKET=1
    export GIT_TRACE=1
    export GIT_CURL_VERBOSE=1

  If the git client is on a Windows machine:

    set GIT_TRACE_PACKET=1
    set GIT_TRACE=1
    set GIT_CURL_VERBOSE=1


Cause

This issue generally occurs if Windows credentials manager on user's client machine is utilized and holds old credentials or incorrect credentials which need to be changed or updated.

Solution

Issue should be resolved by unsetting the credential of user from Windows credentials manager. Please get in touch with the admin to perform this task.
After this, process should ask for a username:password prompt while performing git operations like clone and push where correct credentials should be passed.

Last modified on May 23, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.