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

fix(gomod): remove token encoding #12352

Merged
merged 6 commits into from Oct 27, 2021
Merged

fix(gomod): remove token encoding #12352

merged 6 commits into from Oct 27, 2021

Conversation

Shegox
Copy link
Contributor

@Shegox Shegox commented Oct 27, 2021

Changes:

This PR checks if a given token starts with x-access-token: as the token is constructed in this way to support GitHub App functionality in other places.
If this is the case only the token part after x-access-token: is encoded.

Context:

Fixes #12339

Documentation (please check one with an [x])

  • I have updated the documentation, or
  • No documentation update is required

How I've tested my work (please tick one)

I have verified these changes via:

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests but ran on a real repository, or
  • Both unit tests + ran on a real repository

@rarkins
Copy link
Collaborator

rarkins commented Oct 27, 2021

In the hosted app we actually do prefix the received token with x-access-token:, so we need to think if this breaks things or if that prefixing had previously broken things.

image

https://github.com/renovatebot/renovate/search?q=x-access-token&type=code

@Shegox Shegox changed the title fix(gomod): use x-access-token as default username for token auth in git urls fix(gomod): encode GitHub App tokens with username correctly in git urls Oct 27, 2021
lib/util/git/auth.ts Outdated Show resolved Hide resolved
lib/util/git/auth.ts Outdated Show resolved Hide resolved
@rarkins rarkins changed the title fix(gomod): encode GitHub App tokens with username correctly in git urls fix(gomod): remove token encoding Oct 27, 2021
@rarkins rarkins enabled auto-merge (squash) October 27, 2021 14:41
@rarkins rarkins requested a review from viceice October 27, 2021 14:41
@rarkins rarkins merged commit 53964d1 into renovatebot:main Oct 27, 2021
@renovate-release
Copy link
Collaborator

🎉 This PR is included in version 28.11.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 27, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Broken auth for private go mod source
4 participants