You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description of the problem, including code/CLI snippet
Creation of user impersonation token fails from CLI with invalid scope error
$ gitlab -d -o json -g example user-impersonation-token create --user-id 168 --name test --scopes '["api"]'
It seems to be trying to pass the supplied value as a string instead of converting to an array (see the output in Actual Behavior). Have tried multiple variations of the scopes value such as api, [api], ["api"], "[api]", and "['api']".
edit: My bad, I've mixed up access token with deploy token. Latter doesn't allow the 'api' value. Proper ones work. It doesn't seem to be possible to create access token from CLI.
original message:
Hi
I also struggle with a similar problem when using CLI - gitlab project-deploy-token create. Just like the author of the issue - I've tried multiple variations of the scopes value and using curl works.
Activity
ruzickap commentedon Jul 30, 2019
Any news about it? I have the same issue...
LonMcGregor commentedon Aug 26, 2021
I also seem to be getting a "scopes is invalid" error when trying to use
gl.applications.create()and the scopes['read_user', 'read_api']Python gitlab 2.10.0
Api v4
Gitlab 14.1.0-ee
krzyslom commentedon Sep 8, 2021
edit: My bad, I've mixed up access token with deploy token. Latter doesn't allow the 'api' value. Proper ones work. It doesn't seem to be possible to create access token from CLI.
original message:
Hi
I also struggle with a similar problem when using CLI -
gitlab project-deploy-token create. Just like the author of the issue - I've tried multiple variations of the scopes value and using curl works.Also, inside Python session:
this doesn't work
but this does
python 3.8.3
python-gitlab 2.10.1
API v4
Gitlab 14.1.3