Connect to an gitlab user

Viewed 47

i would like to connect to a user in my gitlab server.

i connect to the gitlab server:

import gitlab

gl = gitlab.Gitlab('http://10.0.0.120')
print(gl.users.list())

the connect to the server not getting me any errors but after adding the line:

print(gl.users.list())

i get this error:

raise error(e.error_message, e.response_code, e.response_body) from e
gitlab.exceptions.GitlabListError: 403: 403 Forbidden - Not authorized to access /api/v4/users

how can i fix this? thanks.

1 Answers

Usually, we use the terminal to connect to gitlab users. You can follow the following steps:

  1. Call the terminal with "ctrl+~" in vscode

  2. Use command git init

  3. Configure user name and mailbox:

    git config --global user.name “user.name"

    git config --global user.email "user.email"

Related