Skip to content

[Confluence] Token based authorization overridden by content of netrc #1512

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
phantomGik opened this issue Mar 20, 2025 · 1 comment
Open

Comments

@phantomGik
Copy link

An issue with Confluence API authentication

Description

When using token-based authentication, I encountered a 401 Unauthorized error. However, when testing the same token with curl, it worked correctly. After further investigation, I found that I had an outdated .netrc file with incorrect credentials. Once I removed the .netrc file, the token authentication started working as expected.

Unexpected Behavior

The library appears to prioritize .netrc credentials over the explicitly provided token, leading to an authentication failure when incorrect credentials are present in .netrc.

Expected Behavior

When a token is explicitly provided, .netrc should be ignored, ensuring that token authentication functions correctly.

Environment

python==3.8
atlassian-python-api==3.41.21
requests==2.31.0

@phantomGik phantomGik changed the title Token based authorization overrided by content of netrc Token based authorization overridden by content of netrc Mar 20, 2025
@gonchik gonchik changed the title Token based authorization overridden by content of netrc [Confluence] Token based authorization overridden by content of netrc Mar 25, 2025
@gonchik
Copy link
Member

gonchik commented Apr 1, 2025

@phantomGik could share how did you make the initialization step by .netrc ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants