-
Notifications
You must be signed in to change notification settings - Fork 8
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
Authentication failure when using GitHub App token #259
Comments
Hey @zeshuaro, It's hard to say where is exactly the url construction broken. I'm afraid, we have not tested this plugin with the latest semrel (22, 23?). I would suggest to add debug/logging point to /**
* @private
*/
export const getToken = (env: TAnyMap, repoUrl: string): string | undefined => env.GH_TOKEN || env.GITHUB_TOKEN || extractRepoToken(repoUrl)
/**
* @private
*/
export const reassembleRepoUrl = (redirectedUrl: string, context: TContext): string | undefined => {
const { env } = context
const repoName = extractRepoName(redirectedUrl)
const repoDomain = extractRepoDomain(redirectedUrl)
const token = getToken(env, redirectedUrl)
return `https://${token}@${repoDomain}/${repoName}.git` // ← this point
} |
Unfortunately, running it in dry run mode doesn't print anything as the
I saw this other issue on semantic-release which might be related? semantic-release/semantic-release#1807 Specifically, they have this logic here when generating the Git URL which accommodates for app installation tokens: https://github.com/semantic-release/semantic-release/blob/971a5e0d16f1a32e117e9ce382a1618c8256d0d9/lib/get-git-auth-url.js#L67 |
Hmm... Config resolution is also used in |
Sorry, my bad, missed the line in the wall of logs. But this is what the URL looks like: |
Was this overcome somehow? I see the same problem with a |
No, I had to keep using a personal access token for now |
I see. Thanks for your response. |
Issue type
Expected behavior
Not sure if this is a bug or feature request, but the plugin currently doesn't work with a GitHub App token.
Actual behavior
See GitHub actions logs: https://github.com/zeshuaro/appainter/actions/runs/7516650742/job/20462200224
Error
Steps to reproduce
GITHUB_TOKEN
environment variableGitHub Actions config: https://github.com/zeshuaro/appainter/actions/runs/7516650742/workflow#L277-L319
Semantic release config: https://github.com/zeshuaro/appainter/blob/main/publish.release.config.js
Specifications
The text was updated successfully, but these errors were encountered: