mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-01-26 04:22:05 +02:00
bb170f3b9c
closes #3361
37 lines
1.0 KiB
Markdown
37 lines
1.0 KiB
Markdown
# Multiple tokens found, but only one is allowed
|
|
|
|
GoReleaser infers if you are using GitHub, GitLab or Gitea by which tokens are provided.
|
|
If you have multiple tokens set, you'll get this error.
|
|
|
|
Here's an example:
|
|
|
|
```sh
|
|
⨯ release failed after 0.02s error=gmultiple tokens found, but only one is allowed: GITHUB_TOKEN, GITLAB_TOKEN
|
|
|
|
Learn more at https://goreleaser.com/errors/multiple-tokens
|
|
```
|
|
|
|
In this case, you either unset `GITHUB_TOKEN` or `GITLAB_TOKEN`.
|
|
You can read more about it in the [SCM docs](/scm/github/).
|
|
|
|
This can also happen if you load the tokens from files.
|
|
The default paths are:
|
|
|
|
- `~/.config/goreleaser/github_token`
|
|
- `~/.config/goreleaser/gitlab_token`
|
|
- `~/.config/goreleaser/gitea_token`
|
|
|
|
If you have more than one of these files, but for a particular project, you want
|
|
to force one of them, you can explicitly disable the others by setting them to a
|
|
file you know won't exist:
|
|
|
|
```yaml
|
|
|
|
# .goreleaser.yaml
|
|
env_files:
|
|
gitlab_token: ~/nope
|
|
gitea_token: ~/nope
|
|
```
|
|
|
|
This will prevent using both GitLab and Gitea tokens.
|