Skip to content

Prevent persisting credentials via actions/checkout #233

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

Merged

Conversation

landongrindheim
Copy link
Member

There are two small changes here:

  • Using persist-credentials: false in an actual GitHub Action
  • Updating a code example to use persist-credentials: false

Both changes reflect a desired state of not writing credentials to .git/config, which is the default behavior or actions/checkout.

`actions/checkout` uses a default value of `true` for
`persist-credentials`, which results in credentials being written to
the Git config.
Since this snippet is meant to be exemplary, it makes sense to
explicitly set `persist-credentials` to `false`. The default value is
`true`.
@landongrindheim landongrindheim merged commit 387727a into master Jun 19, 2025
2 checks passed
@landongrindheim landongrindheim deleted the use-persist-credentials-false-for-actions-checkout branch June 19, 2025 13:20
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