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

[vergo:patch-release] Fix problems authenticating using GITHUB_TOKEN #19

Merged
merged 1 commit into from
May 10, 2024

Conversation

lacarvalho91
Copy link
Contributor

@lacarvalho91 lacarvalho91 commented May 9, 2024

I have tested this change locally by using vergo to push a tag to a test repository. Using what is currently on the master branch the command fails with:

push to remote origin error: authentication required

Using the changes on this branch the tag is pushed successfully.

Also tested this on an actual GitHub Actions Workflow.

@@ -125,8 +125,9 @@ func PushTag(r *gogit.Repository, version, prefix, remote string, dryRun bool, d

if githubToken, ok := os.LookupEnv("GITHUB_TOKEN"); ok {
log.Debug("Using Github Bearer Token Auth")
auth = &http.TokenAuth{
Token: githubToken,
auth = &http.BasicAuth{
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@lacarvalho91 lacarvalho91 marked this pull request as ready for review May 10, 2024 09:30
@chuckydev chuckydev merged commit ff95f94 into master May 10, 2024
@lacarvalho91 lacarvalho91 deleted the fix-github-token-support branch May 10, 2024 09:46
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

Successfully merging this pull request may close these issues.

2 participants