goreleaser: [Bug]: fails with error=github/gitlab/gitea releases: failed to publish artifacts: using v0.180.0 or later
What happened?
our CI script always gets the latest version of goreleaser via curl -sL https://git.io/goreleaser | sh
Prior to yesterday, we last released 28 days ago with no issue.
Yesterday, we attempted to release and we experienced the following error:
• publishing
111s
89 • github/gitlab/gitea releases
111s
90 • creating or updating release repo=@github.com/shipt/platformctl tag=2.22.5
111s
91 • release updated url=
111s
92 ⨯ release failed after 103.35s error=github/gitlab/gitea releases: failed to publish artifacts: POST https://api.github.com/repos/@github.com/shipt/platformctl/releases: 404 Not Found []
We made no changes to our goreleaser configuration between the two release attempts.
After updating our CI build to pass in the ENV VAR $VERSION=v0.179.0
to the step that runs goreleaser, our releases were successful.
succeeds using v0.179.0, fails using v0.180.0 and v0.180.2.
How can we reproduce this?
attempt to release a project stored in github using the following config:
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod download
- go generate ./...
builds:
- main: client/main.go
binary: platformctl
ldflags: -s -w -X github.com/shipt/platformctl/client/metadata.Buildtime={{.Date}} -X github.com/shipt/platformctl/client/metadata.Version={{.Version}} -X github.com/shipt/platformctl/client/metadata.Environment=platform-production
env:
- CGO_ENABLED=0
goos:
- darwin
- linux
goarch:
- amd64
archives:
- replacements:
darwin: Darwin
linux: Linux
amd64: x86_64
name_template: "{{ .Binary }}_{{ .Version }}_{{ tolower .Os }}-{{ .Arch }}"
format: tar.gz
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
```
using v0.180.0 or later
### goreleaser version
```bash
v0.180.2
GoReleaser Check
- goreleaser check shows no errors
Search
- I did search for other open and closed issues before opening this.
Code of Conduct
- I agree to follow this project’s Code of Conduct
Additional context
No response
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 16 (11 by maintainers)
Commits related to this issue
- fix: add a debug log on git config refs #2537 Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> — committed to goreleaser/goreleaser by caarlos0 3 years ago
- fix: add a debug log on git config refs #2537 Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> — committed to goreleaser/goreleaser by caarlos0 3 years ago
- fix: add a debug log on git config refs #2537 Signed-off-by: Carlos Alexandro Becker <caarlos0@gmail.com> — committed to goreleaser/goreleaser by caarlos0 3 years ago
It looks like https://github.com/goreleaser/goreleaser/pull/2527 resolved the issue.
Thanks for the prompt turn around on this!
@caarlos0
We do have a URL rewrite in place that adds our github token to the URL so that we can access our private repos:
git config --global url."https://$GITHUB_TOKEN:@github.com".insteadOf "https://github.com"
I moved the statements you asked about after the config change and here’s the new output:
My guess is that you guys changed how you’re parsing the URL and it no longer works with the token prepended?
I will try the new version shortly.