gitbackup icon indicating copy to clipboard operation
gitbackup copied to clipboard

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

Open duracell opened this issue 2 years ago • 7 comments

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 :)

duracell avatar Feb 09 '22 15:02 duracell

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")

amitsaha avatar Feb 10 '22 04:02 amitsaha

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.

syphernl avatar Mar 09 '22 08:03 syphernl

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

amitsaha avatar May 20 '22 03:05 amitsaha

I have the same experience with v0.9.0 .

aries1980 avatar Apr 24 '23 09:04 aries1980

Hi @aries1980 - can you please share:

  1. Command you are running
  2. Expected result

amitsaha avatar Apr 24 '23 23:04 amitsaha

I have the same problem on MacOS

alex-lechner avatar May 26 '23 15:05 alex-lechner

Hi @alex-lechner can you please share:

  1. Command you are running
  2. Expected result

amitsaha avatar May 27 '23 03:05 amitsaha