HTTPS Credentials with Data Sources and git with Bitbucket API Keys no longer working #11882

Open
opened 2025-12-29 21:51:11 +01:00 by adam · 5 comments
Owner

Originally created by @JarofDirt on GitHub (Nov 28, 2025).

NetBox Edition

NetBox Community

NetBox Version

v4.4.6

Python Version

3.12

Steps to Reproduce

(This may apply to credentials overall but we're using the bitbucket API keys - https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/)

  1. Create a data source
    • Name:
    • Type: Git
    • URL: https://{bitbucket_username}@bitbucket.org/{workspace}/{repository}.git
    • Username: {bitbucket_username}
    • Password: {api_key}
  2. Save & Sync.

Expected Behavior

Git repo will sync.

Observed Behavior

Error code returned: SyncError('Fetching remote data failed (HTTPUnauthorized): No valid credentials provided')

Originally created by @JarofDirt on GitHub (Nov 28, 2025). ### NetBox Edition NetBox Community ### NetBox Version v4.4.6 ### Python Version 3.12 ### Steps to Reproduce (This may apply to credentials overall but we're using the bitbucket API keys - https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/) 1. Create a data source - Name: <Whatever> - Type: Git - URL: `https://{bitbucket_username}@bitbucket.org/{workspace}/{repository}.git` - Username: `{bitbucket_username}` - Password: `{api_key}` 2. Save & Sync. ### Expected Behavior Git repo will sync. ### Observed Behavior Error code returned: `SyncError('Fetching remote data failed (HTTPUnauthorized): No valid credentials provided')`
adam added the type: bugstatus: needs ownernetboxseverity: low labels 2025-12-29 21:51:12 +01:00
Author
Owner

@JarofDirt commented on GitHub (Nov 28, 2025):

I suspect the issue might be localized to Bitbucket or any other platforms that may utilize the username directly in the URL field. While debugging I found that removing the username from the clone_args in the data_backend.py file the sync completed.

We last had it working on Netbox v4.2

@JarofDirt commented on GitHub (Nov 28, 2025): I suspect the issue might be localized to Bitbucket or any other platforms that may utilize the username directly in the URL field. While debugging I found that removing the username from the `clone_args` in the `data_backend.py` file the sync completed. We last had it working on Netbox `v4.2`
Author
Owner

@bctiemann commented on GitHub (Dec 1, 2025):

@JarofDirt Just to clarify, does this work again if you switch back to NetBox 4.2? Or has Bitbucket's behavior itself changed?

@bctiemann commented on GitHub (Dec 1, 2025): @JarofDirt Just to clarify, does this work again if you switch back to NetBox 4.2? Or has Bitbucket's behavior itself changed?
Author
Owner

@JarofDirt commented on GitHub (Dec 1, 2025):

Hi @bctiemann, apologies - I should've mentioned that earlier. I am unable to fully revert the instance we're using at our institution at this time. However, standing up dev instances of Netbox 4.2 and 4.3 using the Netbox-Docker repo and using the same Bitbucket credentials is working.

@JarofDirt commented on GitHub (Dec 1, 2025): Hi @bctiemann, apologies - I should've mentioned that earlier. I am unable to fully revert the instance we're using at our institution at this time. However, standing up dev instances of Netbox 4.2 and 4.3 using the Netbox-Docker repo and using the same Bitbucket credentials is working.
Author
Owner

@github-actions[bot] commented on GitHub (Dec 9, 2025):

This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.

@github-actions[bot] commented on GitHub (Dec 9, 2025): This is a reminder that additional information is needed in order to further triage this issue. If the requested details are not provided, the issue will soon be closed automatically.
Author
Owner

@JarofDirt commented on GitHub (Dec 9, 2025):

Hi @bctiemann do you require any further information from us for this issue to be looked at? Please let me know, thanks!

@JarofDirt commented on GitHub (Dec 9, 2025): Hi @bctiemann do you require any further information from us for this issue to be looked at? Please let me know, thanks!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/netbox#11882