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 (custom): Always "Backing up 0 repositores now.." #74

Open
duracell opened this issue Feb 9, 2022 · 7 comments
Open

GitLab (custom): Always "Backing up 0 repositores now.." #74

duracell opened this issue Feb 9, 2022 · 7 comments

Comments

@duracell
Copy link

duracell commented Feb 9, 2022

Hey, first I want to thanks for this nice tool.
I try to backup some repositories in a private GitLab-Installation (which is not hosted by me), but I always get ""Backing up 0 repositores now.." as only response. The permissions should be fine (API+read_*) and if I call it by myself I get a response with the public and my private repositories. There is no difference if I try only to backup private/public/starred repos.
With a curl on the API with my PAT I see all my private and the public repos without any problem.
Is there any hint someone can give me what could be the problem?
I'm using the last binary version on an Ubuntu 18.04 LTS.

Thanks :)

@amitsaha
Copy link
Owner

Hi @duracell - have you experimented with specifying both these options:

-gitlab.projectMembershipType string
        Project type to clone (all, owner, member, starred) (default "all")
 -gitlab.projectVisibility string
        Visibility level of Projects to clone (internal, public, private) (default "internal")

@syphernl
Copy link
Contributor

syphernl commented Mar 9, 2022

I am getting the same with Gitlab:
GITLAB_TOKEN=glpat-XXXXXXXXXXXXXXXXXXX gitbackup -gitlab.projectVisibility private -ignore-fork -service gitlab -use-https-clone

This results in the same error as @duracell mentioned:

2022/03/09 09:01:49 Backing up 0 repositories now..

The token has api and read_repository permissions.

With -gitlab.projectMembershipType member or -gitlab.projectMembershipType owner it shows 2022/03/09 09:30:52 Backing up 347 repositories now.. (and 318 if owner) so that seems to be working.
However, after a few clones it suddenly starts asking for a username and password which should not be needed because I provided an access token and use -use-https-clone which should be able to use the token to clone the repo. Code-wise it appears this should already be the case yet it doesn't happen.

@amitsaha
Copy link
Owner

@duracell can you please try the latest release? https://github.com/amitsaha/gitbackup/releases/tag/v0.8.1
@syphernl thanks for the PR again!

@aries1980
Copy link

I have the same experience with v0.9.0 .

@amitsaha
Copy link
Owner

Hi @aries1980 - can you please share:

  1. Command you are running
  2. Expected result

@alex-lechner
Copy link

I have the same problem on MacOS

@amitsaha
Copy link
Owner

Hi @alex-lechner can you please share:

  1. Command you are running
  2. Expected result

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

5 participants