Skip to content

sudo not woks with latest gitlab #193

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Delagen opened this issue Dec 13, 2016 · 4 comments
Closed

sudo not woks with latest gitlab #193

Delagen opened this issue Dec 13, 2016 · 4 comments

Comments

@Delagen
Copy link

Delagen commented Dec 13, 2016

Traceback (most recent call last):
File "./tagger", line 25, in
project.tags.create({"tag_name":args.tag,"ref":args.ref,"message":args.message}, sudo=args.user)
File "/usr/lib/python2.7/site-packages/gitlab/objects.py", line 142, in create
return self.obj_cls.create(self.gitlab, data, **args)
File "/usr/lib/python2.7/site-packages/gitlab/objects.py", line 353, in create
obj.save()
File "/usr/lib/python2.7/site-packages/gitlab/objects.py", line 323, in save
self._create(**kwargs)
File "/usr/lib/python2.7/site-packages/gitlab/objects.py", line 308, in _create
json = self.gitlab.create(self, **kwargs)
File "/usr/lib/python2.7/site-packages/gitlab/init.py", line 511, in create
raise_error_from_response(r, GitlabCreateError, 201)
File "/usr/lib/python2.7/site-packages/gitlab/exceptions.py", line 180, in raise_error_from_response
response_body=response.content)
gitlab.exceptions.GitlabCreateError: 403: 403 Forbidden - Private token must be specified in order to use sudo

@Delagen
Copy link
Author

Delagen commented Dec 23, 2016

Thound PAT disabled only main access token used
No user id or username error for supplied id

@gpocentek
Copy link
Contributor

It seems that the error comes from the server, not python-gitlab. Have you disabled token authentication on your server?

Sudo works fine for me with token authentication.

@Delagen
Copy link
Author

Delagen commented Dec 25, 2016

@gpocentek Yes.

  1. From version 8.14 Personal Access Tokens was disabled to use sudo. ONLY PRIVATE.
  2. When using sudo argument as user id provided as int data type error about User not found occured, when supply as string all OK.

@gpocentek
Copy link
Contributor

It seems that gitlab now expects a string for the sudo value, even if it's the ID you're using. Could you test this to make sure I'm not wrong?

Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants