releasing on privately hosted Gitlab #1440
Replies: 5 comments 5 replies
-
I think whats missing is that on the can you try that? |
Beta Was this translation helpful? Give feedback.
-
did you assure that the gitlab api token you're using has access to this repo? judging by 404, maybe that's it... |
Beta Was this translation helpful? Give feedback.
-
Hello There Actually I am facing the same issue with gitlab. it takes the path/name of the project instead of the project id. I have checked the gitlab token and it has the required rights. Do you know how to fix this ? thank you for your help # This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
gitlab_urls:
api: https://my.gitlab.com/api/v4
download: https://my.gitlab.com
project_name: sample
builds:
- binary: ./bin/sample
env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
flags:
- -mod=vendor
ldflags:
- -X main.GitVersion=v{{.Version}}
archives:
- format: tar.gz
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
files:
- LICENSE and this is the error
|
Beta Was this translation helpful? Give feedback.
-
First things first, is goreleaser able to release on private repos? Thought as the API-Token is mandatory it might be possible, but I was not able to make it work yet.
Describe the bug
Wanted to integrate goreleaser into the gitlab-CI pipeline of a gitlab repo, privately hosted by my company. Did not even get to set it up manually though, keeps aborting at:
⨯ release failed after 31.15s error=github/gitlab/gitea releases: failed to publish artifacts: GET https://gitlab.mycompany.net/api/v4/projects/path/to/myproject/releases/1.0.1: 404 {message: 404 Project Not Found}
The project repo itself is hosted at https://gitlab.mycompany.net/path/to/my/project/myproject/ and it's visibility is set to private. Thus I am not sure wether or not this makes it not visible at all from the API's perspective, but I hoped specifying an API-Token might be enough to get the job done.
Is there a way to further specify the repository to use, or otherwise release from a private repository? Migrating it to a public Gitlab is an option as well, even though I would like to avoid having to do that.
To reproduce
Expected behaviour
Creating a release page with corresponding archives at https://gitlab.mycompany.net/path/to/my/project/myproject/-/archive/1.0.1/
Environment
Additional Context
Thanks for every help I can get, I am quite new to Software engineering and accordingly unexperienced.
Beta Was this translation helpful? Give feedback.
All reactions