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

Supplied Gitlab token is not being used #75

Closed
migscabral opened this issue Apr 26, 2021 · 3 comments
Closed

Supplied Gitlab token is not being used #75

migscabral opened this issue Apr 26, 2021 · 3 comments

Comments

@migscabral
Copy link

migscabral commented Apr 26, 2021

I'm running the recursive command in our Gitlab.com repo using the command below but I'm getting the error: Please make sure you have the correct access rights and the repository exists.

I redacted the excerpts of the commands and the logs. For reference:

  • XXX = Gitlab Token
  • AAA/BBB** = Filter for groups and subgroup
  • AAA/BBB/CCC = Group/subgroup
gitlabber -t XXX -u https://gitlab.com -i 'AAA/BBB**' --verbose .

...

'
2021-04-26 18:18:35,712 - gitlabber.git - DEBUG - cloning new project ./AAA/BBB/CCC
2021-04-26 18:18:35,712 - git.cmd - DEBUG - Popen(['git', 'clone', '-v', 'git@gitlab.com:AAA/BBB/CCC', './AAA/BBB/CCC'], cwd=/Users/administrator/Documents/gitlab-backups, universal_newlines=True, shell=None, istream=None)
2021-04-26 18:18:37,452 - git.repo.base - DEBUG - Cmd(['git', 'clone', '-v', 'git@gitlab.com:AAA/BBB/CCC.git', './AAA/BBB/CCC'])'s unused stdout:
2021-04-26 18:18:37,452 - git.cmd - DEBUG - AutoInterrupt wait stderr: b"Cloning into './AAA/BBB/CCC'...\ngit@gitlab.com: Permission denied (publickey,keyboard-interactive).\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n"
2021-04-26 18:18:37,452 - gitlabber.git - DEBUG - Error cloning project ./AAA/BBB/CCC
Traceback (most recent call last):
  File "/Users/administrator/.pyenv/versions/3.6.13/lib/python3.6/site-packages/gitlabber/git.py", line 78, in clone_or_pull_project
    git.Repo.clone_from(action.node.url, action.path)
  File "/Users/administrator/.pyenv/versions/3.6.13/lib/python3.6/site-packages/git/repo/base.py", line 1032, in clone_from
    return cls._clone(git, url, to_path, GitCmdObjectDB, progress, multi_options, **kwargs)
  File "/Users/administrator/.pyenv/versions/3.6.13/lib/python3.6/site-packages/git/repo/base.py", line 973, in _clone
    finalize_process(proc, stderr=stderr)
  File "/Users/administrator/.pyenv/versions/3.6.13/lib/python3.6/site-packages/git/util.py", line 329, in finalize_process
    proc.wait(**kwargs)
  File "/Users/administrator/.pyenv/versions/3.6.13/lib/python3.6/site-packages/git/cmd.py", line 408, in wait
    raise GitCommandError(self.args, status, errstr)
git.exc.GitCommandError: Cmd('git') failed due to: exit code(128)
  cmdline: git clone -v git@gitlab.com:/AAA/BBB/CCC.git ./AAA/BBB/CCC
  stderr: 'Cloning into './AAA/BBB/CCC'...
git@gitlab.com: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
'

...

I'm sure that I have access to the repo and that the token is working. I was able to clone successfully using the command:

git clone https://oauth:XXX@gitlab.com:/AAA/BBB/CCC.git
@george-viaud
Copy link

same experience here - using gitlab cloud

@ezbz
Copy link
Owner

ezbz commented Jul 10, 2021

did you try changing the method to http with the -m flag?

Note the successful example you've provided is using the http method but gitlabber's default is ssh

@ezbz
Copy link
Owner

ezbz commented Aug 27, 2021

closing due to inactivity

@ezbz ezbz closed this as completed Aug 27, 2021
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