How is the GitHub token injected into git?

As I understand, within a run command line git has access to the GitHub token that was created specifically for the run.

How is the token injected into git here? Is it added to the git credential store? Or some other way?

Check the output of the actions/checkout step in your workflow log. Assuming it’s using Git to retrieve the repository (as opposed to the API if Git isn’t available on the runner) you’ll see it setting up an Authorization header in the “Setting up auth” section.

No it isn’t done w/ the git credential store, it’s done w/ the .git/config file:

1 Like