releasing on privately hosted Gitlab #1440
-
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:
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. To reproduce project_name: myproject
before:
hooks:
- go get -v -d ./...
- go generate ./...
gitlab_urls:
api: https://gitlab.mycompany.net/api/v4
download: https://gitlab.mycompany.net/path/to/my/project/myproject/-/archive/1.0.1/myproject-1.0.1.tar.gz
skip_tls_verify: false
release:
prerelease: true
builds:
- env:
- CGO_ENABLED=0
archives:
- replacements:
darwin: Darwin
linux: Linux
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
brews:
- name: myproject
gitlab:
owner: mycompany
name: myproject
commit_author:
name: mycompany
email: [email protected]
folder: Formula
homepage: https://mycompany.de/
description: My Tools description 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.
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.
did you assure that the gitlab api token you're using has access to this repo?
judging by 404, maybe that's it...