Persist creds to a separate file#2286
Merged
ericsciple merged 1 commit intomainfrom Nov 3, 2025
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
a370417 to
eddff11
Compare
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
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>
kodiakhq Bot
pushed a commit
to pdylanross/fatigue
that referenced
this pull request
Nov 21, 2025
Bumps actions/checkout from 5 to 6. Release notes Sourced from actions/checkout's releases. v6.0.0 What's Changed Update README to include Node.js 24 support details and requirements by @salmanmkc in actions/checkout#2248 Persist creds to a separate file by @ericsciple in actions/checkout#2286 v6-beta by @ericsciple in actions/checkout#2298 update readme/changelog for v6 by @ericsciple in actions/checkout#2311 Full Changelog: actions/checkout@v5.0.0...v6.0.0 v6-beta What's Changed Updated persist-credentials to store the credentials under $RUNNER_TEMP instead of directly in the local git config. This requires a minimum Actions Runner version of v2.329.0 to access the persisted credentials for Docker container action scenarios. v5.0.1 What's Changed Port v6 cleanup to v5 by @ericsciple in actions/checkout#2301 Full Changelog: actions/checkout@v5...v5.0.1 Changelog Sourced from actions/checkout's changelog. Changelog V6.0.0 Persist creds to a separate file by @ericsciple in actions/checkout#2286 Update README to include Node.js 24 support details and requirements by @salmanmkc in actions/checkout#2248 V5.0.1 Port v6 cleanup to v5 by @ericsciple in actions/checkout#2301 V5.0.0 Update actions checkout to use node 24 by @salmanmkc in actions/checkout#2226 V4.3.1 Port v6 cleanup to v4 by @ericsciple in actions/checkout#2305 V4.3.0 docs: update README.md by @motss in actions/checkout#1971 Add internal repos for checking out multiple repositories by @mouismail in actions/checkout#1977 Documentation update - add recommended permissions to Readme by @benwells in actions/checkout#2043 Adjust positioning of user email note and permissions heading by @joshmgross in actions/checkout#2044 Update README.md by @nebuk89 in actions/checkout#2194 Update CODEOWNERS for actions by @TingluoHuang in actions/checkout#2224 Update package dependencies by @salmanmkc in actions/checkout#2236 v4.2.2 url-helper.ts now leverages well-known environment variables by @jww3 in actions/checkout#1941 Expand unit test coverage for isGhes by @jww3 in actions/checkout#1946 v4.2.1 Check out other refs/* by commit if provided, fall back to ref by @orhantoy in actions/checkout#1924 v4.2.0 Add Ref and Commit outputs by @lucacome in actions/checkout#1180 Dependency updates by @dependabot- actions/checkout#1777, actions/checkout#1872 v4.1.7 Bump the minor-npm-dependencies group across 1 directory with 4 updates by @dependabot in actions/checkout#1739 Bump actions/checkout from 3 to 4 by @dependabot in actions/checkout#1697 Check out other refs/* by commit by @orhantoy in actions/checkout#1774 Pin actions/checkout's own workflows to a known, good, stable version. by @jww3 in actions/checkout#1776 v4.1.6 Check platform to set archive extension appropriately by @cory-miller in actions/checkout#1732 v4.1.5 Update NPM dependencies by @cory-miller in actions/checkout#1703 Bump github/codeql-action from 2 to 3 by @dependabot in actions/checkout#1694 Bump actions/setup-node from 1 to 4 by @dependabot in actions/checkout#1696 Bump actions/upload-artifact from 2 to 4 by @dependabot in actions/checkout#1695 ... (truncated) Commits 1af3b93 update readme/changelog for v6 (#2311) 71cf226 v6-beta (#2298) 069c695 Persist creds to a separate file (#2286) ff7abcd Update README to include Node.js 24 support details and requirements (#2248) See full diff in compare view Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase. Dependabot commands and options You can trigger Dependabot actions by commenting on this PR: @dependabot rebase will rebase this PR @dependabot recreate will recreate this PR, overwriting any edits that have been made to it @dependabot merge will merge this PR after your CI passes on it @dependabot squash and merge will squash and merge this PR after your CI passes on it @dependabot cancel merge will cancel a previously requested merge and block automerging @dependabot reopen will reopen this PR if it is closed @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually @dependabot show <dependency name> ignore conditions will show all of the ignore conditions of the specified dependency @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself) @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
13 tasks
This was referenced Mar 11, 2026
2 tasks
Merged
5 tasks
This was referenced Apr 28, 2026
This was referenced Apr 30, 2026
2 tasks
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.