semantic-release / semantic-release/gitlab
Can't use TOKEN with a project with group permissions
Open
Nobody has claimed this yet.
bug
upstream
- Dominant language
- JavaScript
- Stars
- 344
- Forks
- 89
- Avg merge
- 16h 11m
- Merged PRs (30d)
- 4
Description
Get this error:
[4:11:51 PM] [semantic-release] [@semantic-release/gitlab] › ℹ Verify GitLab authentication (https://gitlab.com/api/v4)
[4:11:51 PM] [semantic-release] › ✖ Failed step "verifyConditions" of plugin "@semantic-release/gitlab"
[4:11:51 PM] [semantic-release] › ✖ EGLNOPERMISSION The GitLab token doesn't allow to push on the repository *******.
The user associated with the GitLab token (https://github.com/semantic-release/gitlab/blob/master/README.md#gitlab-authentication) configured in the GL_TOKEN or GITLAB_TOKEN environment variable must allows to push to the repository *******.
Please make sure the GitLab user associated with the token has the permission to push (https://docs.gitlab.com/ee/user/permissions.html#project-members-permissions) to the repository *********.
This is what I get with a direct call to the gitlab API:
curl --header "Private-Token: ***********" https://gitlab.com/api/v4/projects/****
[...]
"shared_with_groups": [
{
"group_id": *****,
"group_name": "*********",
"group_full_path": "****",
"group_access_level": 40,
"expires_at": null
}
[....]
]
"permissions": {
"project_access": null,
"group_access": null
}
So, this code doesn't verify correctly the permissions:
https://github.com/semantic-release/gitlab/blob/cfa2f177d866addb4618a6e0cd3aaeed1f70bf7e/lib/verify.js#L51
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.