Skip to content

add_mirror with gitlab.exceptions.GitlabAuthenticationError: 401: invalid_token #138

@supper-hub

Description

@supper-hub
gitmirror@david_vm:~/gitlab-mirrors$ ./add_mirror.sh --git --project-name gitlab-mirrors --mirror https://github.com/samrocketman/gitlab-mirrors.git
Resolving gitlab remote.
Traceback (most recent call last):
  File "lib/manage_gitlab_project.py", line 137, in <module>
    found_group = find_group(name=gitlab_namespace)
  File "lib/manage_gitlab_project.py", line 56, in find_group
    groups = git.groups.list(all_available=False)
  File "/usr/local/lib/python2.7/dist-packages/gitlab/exceptions.py", line 267, in wrapped_f
    return f(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlab/mixins.py", line 134, in list
    obj = self.gitlab.http_list(path, **data)
  File "/usr/local/lib/python2.7/dist-packages/gitlab/__init__.py", line 644, in http_list
    return list(GitlabList(self, url, query_data, get_next=False, **kwargs))
  File "/usr/local/lib/python2.7/dist-packages/gitlab/__init__.py", line 767, in __init__
    self._query(url, query_data, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlab/__init__.py", line 772, in _query
    result = self._gl.http_request("get", url, query_data=query_data, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/gitlab/__init__.py", line 562, in http_request
    response_body=result.content,
gitlab.exceptions.GitlabAuthenticationError: 401: invalid_token
There was an unknown issue with manage_gitlab_project.py
gitmirror@david_vm:~/gitlab-mirrors$ cd ..
gitmirror@david_vm:~$ ls
gitlab-mirrors  private_token  repositories
gitmirror@david_vm:~$ cat private_token
xsn99YNsZ7qz7hLhpRL4

It's already generated "personal access token".and added to private_token.But it's wrong apparently!I'm gratefull you fixing it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions