Skip to content
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

Bitbucket uses x-token-auth instead of x-access-token #14

Open
5-tom opened this issue Jul 13, 2023 · 0 comments
Open

Bitbucket uses x-token-auth instead of x-access-token #14

5-tom opened this issue Jul 13, 2023 · 0 comments

Comments

@5-tom
Copy link

5-tom commented Jul 13, 2023

Bitbucket uses x-token-auth instead of x-access-token in the git URL (https://support.atlassian.com/bitbucket-cloud/docs/using-access-tokens/). The following change should work, but I am unable to test it:

if re_match "${GIT_REPOSITORY:-}" '^https://github.com/'; then
  _auth="x-access-token:$GIT_TOKEN"
else
  _auth="oauth2:$GIT_TOKEN"
fi
if re_match "${GIT_REPOSITORY:-}" '^https://github.com/'; then
  _auth="x-access-token:$GIT_TOKEN"
elif re_match "${GIT_REPOSITORY:-}" '^https://bitbucket.org/'; then
  _auth="x-token-auth:$GIT_TOKEN"
else
  _auth="oauth2:$GIT_TOKEN"
fi
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

1 participant