-
-
Notifications
You must be signed in to change notification settings - Fork 115
fix(terragrunt): add missing username for token authentication #7506
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(terragrunt): add missing username for token authentication #7506
Conversation
Fix token-only authentication by providing username default for go-git. PR updatecli#7359 added token support but token-only auth fails because go-git requires non-empty username for HTTP BasicAuth. This fix adds: - Username *string field to Spec with oauth2 default - getUsername() method matching GitHub SCM plugin behavior - Updated manifest template to include username field - Test coverage for getUsername() Fixes token authentication added in updatecli#7359
|
Thanks I assumed the other pr was enough but I am happy to merge this one as well |
I missed that username "can be anything except an empty string" when I did PR #7359. |
|
Could you have a look the "github.com/updatecli/updatecli/pkg/plugins/autodiscovery/terragrunt" test is not passing |
Head branch was pushed to by a user without write access
done |
Head branch was pushed to by a user without write access
Head branch was pushed to by a user without write access
olblak
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the fix
…ecli#7506) * fix(terragrunt): add missing username for token authentication Fix token-only authentication by providing username default for go-git. PR updatecli#7359 added token support but token-only auth fails because go-git requires non-empty username for HTTP BasicAuth. This fix adds: - Username *string field to Spec with oauth2 default - getUsername() method matching GitHub SCM plugin behavior - Updated manifest template to include username field - Test coverage for getUsername() Fixes token authentication added in updatecli#7359 * fix(terragrunt):Fixes test failure introduced by adding username support * fix(terragrunt): only include username when token is configured * fix(terragrunt): return empty username when token not configured --------- Co-authored-by: Olivier Vernin <olivier@vernin.me>
Summary
Fixes token authentication from #7359 by adding required username field.
PR #7359 added token support but authentication fails with:
Root cause: go-git requires non-empty username for HTTP BasicAuth even with token-only auth.
Solution