Skip to content

Commit

Permalink
Update README.md (#28)
Browse files Browse the repository at this point in the history
* Add a line about the token generated in the workflow
* Hardcode a user and provide an explanation as it is not used by GitHub
  • Loading branch information
antham authored Mar 30, 2024
1 parent b7c7639 commit 2610644
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,12 +138,14 @@ your own proxy. You'll need to add a
[personal access token](https://github.com/settings/tokens) as a secret
environment variable, as well as configure
[GOPRIVATE](https://go.dev/ref/mod#private-modules).
You can also directly used the token provided by [GitHub](https://docs.github.com/fr/enterprise-cloud@latest/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) in the workflow.
You can define anything as username in the URL, it is not taken into account by GitHub.

```yaml
- name: Configure git for private modules
env:
TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: git config --global url."https://YOUR_GITHUB_USERNAME:${TOKEN}@github.com".insteadOf "https://github.com"
run: git config --global url."https://user:${TOKEN}@github.com".insteadOf "https://github.com"
```

```yaml
Expand Down

0 comments on commit 2610644

Please sign in to comment.