Skip to content
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

gitlab 12.3 comunnity edition authenticationError 401 #123

Open
janblaha opened this issue Oct 8, 2019 · 3 comments
Open

gitlab 12.3 comunnity edition authenticationError 401 #123

janblaha opened this issue Oct 8, 2019 · 3 comments

Comments

@janblaha
Copy link

janblaha commented Oct 8, 2019

./add_mirror.sh --git --project-name github-gitlab-mirrors --mirror https://github.com samrocketman/gitlab-mirrors.git
Resolving gitlab remote.
Creating new project github-gitlab-mirrors
Traceback (most recent call last):
File "lib/manage_gitlab_project.py", line 144, in
found_project=createproject(project_name)
File "lib/manage_gitlab_project.py", line 111, in createproject
git.projects.create(project_options)
File "/usr/lib/python2.7/site-packages/gitlab/exceptions.py", line 259, in wrapped_f
return f(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/gitlab/mixins.py", line 204, in create
server_data = self.gitlab.http_post(path, post_data=data, files=files, **kwargs)
File "/usr/lib/python2.7/site-packages/gitlab/init.py", line 691, in http_post
**kwargs
File "/usr/lib/python2.7/site-packages/gitlab/init.py", line 575, in http_request
response_body=result.content,
gitlab.exceptions.GitlabAuthenticationError: 401: 401 Unauthorized
There was an unknown issue with manage_gitlab_project.py

SSH key is OK and gitlab authentication is as well OK.
Tested by
GIT_TRACE=1 GIT_SSH_COMMAND="ssh -vvv" git clone git@gitlab.terminus.cz:group-name/project-name.git

@janblaha
Copy link
Author

janblaha commented Oct 8, 2019

Not an issue

My bad, respectively please add to installation description properly instruction, how to configure gitmirror client in gitlab.

Reading this https://python-gitlab.readthedocs.io/en/stable/cli.html#examples and this https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html i found, that ssh key is not enough and after private_token creating works like a charm.

@zhangshangbj
Copy link

Nginx did not start

@samrocketman
Copy link
Owner

Hi @janblaha would you mind opening a pull request for documentation to the develop branch? I myself do not use GitLab and use it for personal git repository backups to a drive.

So if you don't mind, documenting the extra steps and noting what version of GitLab the steps apply I think would be helpful for others.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants