Persist creds to a separate file - #2286
Merged
Merged
Conversation
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
commented
Oct 17, 2025
ericsciple
force-pushed
the
users/ericsciple/25-10-cred
branch
from
October 17, 2025 19:00
a370417 to
eddff11
Compare
ericsciple
marked this pull request as ready for review
October 17, 2025 19:00
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR refactors Git credential management to persist credentials in a separate config file instead of directly in the repository's .git/config. The change improves security by isolating credentials from the main Git configuration and uses Git's includeIf mechanism to conditionally include the credentials when needed.
Key changes:
- Moves credential storage from
.git/configto a separate file inRUNNER_TEMP - Uses Git's
includeIf.gitdirfeature to conditionally include credentials based on Git directory path - Updates both main repository and submodule authentication to use the new approach
Reviewed Changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/git-command-manager.ts | Adds new methods for config file operations and configFile parameter support |
| src/git-auth-helper.ts | Refactors credential management to use separate config files with includeIf entries |
| test/verify-submodules-true.sh | Updates test to use --includes flag when checking for credentials |
| test/verify-submodules-recursive.sh | Updates test to use --includes flag when checking for credentials |
| test/git-directory-helper.test.ts | Adds mock implementations for new git command manager methods |
| test/git-auth-helper.test.ts | Updates tests to verify new credential file structure and behavior |
| .github/workflows/test.yml | Adjusts workflow paths to avoid conflicts with new checkout behavior |
Comments suppressed due to low confidence (1)
src/git-auth-helper.ts:1
- The test name
configureAuth_AcceptsGitHubServerUrlSetToGHECdoesn't match the test description 'inject https://github.com as github server url'. Consider using a more descriptive name likeconfigureAuth_AcceptsGitHubServerUrlto match the actual test purpose.
import * as assert from 'assert'
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
ericsciple
commented
Oct 20, 2025
ericsciple
force-pushed
the
users/ericsciple/25-10-cred
branch
from
October 20, 2025 18:56
eddff11 to
cb17bfb
Compare
TingluoHuang
approved these changes
Oct 22, 2025
salmanmkc
approved these changes
Oct 22, 2025
Merged
luketainton
pushed a commit
to luketainton/repos_roboluke
that referenced
this pull request
Nov 20, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://github.com/actions/checkout) | action | major | `v5.0.1` -> `v6.0.0` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v6.0.0`](https://github.com/actions/checkout/releases/tag/v6.0.0) [Compare Source](actions/checkout@v5.0.1...v6.0.0) #### What's Changed - Update README to include Node.js 24 support details and requirements by [@​salmanmkc](https://github.com/salmanmkc) in [#​2248](actions/checkout#2248) - Persist creds to a separate file by [@​ericsciple](https://github.com/ericsciple) in [#​2286](actions/checkout#2286) - v6-beta by [@​ericsciple](https://github.com/ericsciple) in [#​2298](actions/checkout#2298) - update readme/changelog for v6 by [@​ericsciple](https://github.com/ericsciple) in [#​2311](actions/checkout#2311) **Full Changelog**: <actions/checkout@v5.0.0...v6.0.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xOC4wIiwidXBkYXRlZEluVmVyIjoiNDIuMTguMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=--> Reviewed-on: https://git.tainton.uk/repos/roboluke/pulls/396 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk> Co-committed-by: renovate[bot] <renovate-bot@git.tainton.uk>
luketainton
pushed a commit
to luketainton/repos_epage
that referenced
this pull request
Nov 20, 2025
This PR contains the following updates: | Package | Type | Update | Change | |---|---|---|---| | [actions/checkout](https://github.com/actions/checkout) | action | major | `v5.0.1` -> `v6.0.0` | --- ### Release Notes <details> <summary>actions/checkout (actions/checkout)</summary> ### [`v6.0.0`](https://github.com/actions/checkout/releases/tag/v6.0.0) [Compare Source](actions/checkout@v5.0.1...v6.0.0) #### What's Changed - Update README to include Node.js 24 support details and requirements by [@​salmanmkc](https://github.com/salmanmkc) in [#​2248](actions/checkout#2248) - Persist creds to a separate file by [@​ericsciple](https://github.com/ericsciple) in [#​2286](actions/checkout#2286) - v6-beta by [@​ericsciple](https://github.com/ericsciple) in [#​2298](actions/checkout#2298) - update readme/changelog for v6 by [@​ericsciple](https://github.com/ericsciple) in [#​2311](actions/checkout#2311) **Full Changelog**: <actions/checkout@v5.0.0...v6.0.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi4xOC4wIiwidXBkYXRlZEluVmVyIjoiNDIuMTguMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsidHlwZS9kZXBlbmRlbmNpZXMiXX0=--> Reviewed-on: https://git.tainton.uk/repos/epage/pulls/179 Co-authored-by: renovate[bot] <renovate-bot@git.tainton.uk> Co-committed-by: renovate[bot] <renovate-bot@git.tainton.uk>
This was referenced Nov 20, 2025
This was referenced Aug 26, 2026
This was referenced Sep 1, 2026
2 tasks
This was referenced Sep 12, 2026
1 task
This was referenced Sep 13, 2026
This was referenced Sep 14, 2026
This was referenced Sep 16, 2026
Merged
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.