You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14Lines changed: 14 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -142,6 +142,20 @@ You can address the error `ssh: handshake failed: knownhosts: key is unknown ` w
142
142
- Calling `ssh-keyscan -H github.com >> ~/.ssh/known_hosts` prior to pushing your vergo tag to introduce github to your known hosts.
143
143
- Calling `vergo` with the `--disable-strict-host-check` flag. This should only be used on CI where known hosts are not cached.
144
144
145
+
## Using GITHUB_TOKEN inside GitHub Actions
146
+
147
+
Vergo will first try to use Token Bearer Authentication using the GITHUB_TOKEN environment variable when running inside a GitHub Action/Workflow. It will fallback to ssh based authentication if the GITHUB_TOKEN is not present.
148
+
149
+
Inside github actions please ensure that the GITHUB_TOKEN environment variable is set with the `${{ secrets.GITHUB_TOKEN }}` in order to push to the current repository.
150
+
151
+
Please see [token authentication](https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow) for further details.
152
+
153
+
The GITHUB_TOKEN will require the following permissions to be able to push:
154
+
```yaml
155
+
permissions:
156
+
contents: write
157
+
```
158
+
145
159
## Running Locally - SSH Key Failures
146
160
You can address the error `FATA[0000] failed to get signers, make sure to add private key identities to the authentication agent error="<nil>"` when pushing tags with vergo by:
147
161
- Calling `ssh-add ~/.ssh/<github_key>` to add your github ssh key to the ssh agent
0 commit comments