-
Notifications
You must be signed in to change notification settings - Fork 1
fix(sync): Use token-authenticated URL for git push to consumer repos #228
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -679,9 +679,11 @@ jobs: | |||||||||||||||||
| exit 0 | ||||||||||||||||||
| fi | ||||||||||||||||||
|
|
||||||||||||||||||
| # Configure git | ||||||||||||||||||
| # Configure git with token-based authentication for push | ||||||||||||||||||
| git config user.name "github-actions[bot]" | ||||||||||||||||||
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||||||||||||||||||
| git config credential.helper store | ||||||||||||||||||
| echo "https://x-access-token:${GH_TOKEN}@github.com" > ~/.git-credentials | ||||||||||||||||||
|
Comment on lines
+682
to
+686
|
||||||||||||||||||
| # Configure git with token-based authentication for push | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git config credential.helper store | |
| echo "https://x-access-token:${GH_TOKEN}@github.com" > ~/.git-credentials | |
| # Configure git author for commit | |
| git config user.name "github-actions[bot]" | |
| git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
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.
The git credential helper configuration is redundant since the push command on line 705 uses a token-embedded URL directly. When using a token-embedded URL, git doesn't need to look up credentials from the credential helper. These lines can be removed to simplify the code and avoid writing credentials to disk unnecessarily.