Closed syphernl closed 2 years ago
Thank you for your contribution.
I separated the private repo check & https cloning as it made no sense (to me) to combine these two checks.
The reason they are together (or, were) is that when the https cloning was added, it was added to support private repositories. But, perhaps that's not necessary.
On GitLab the
repo.Private
always seems to befalse
which prevented theuseHttpsClone
from being applied.
Interesting, i will have a look at this.
Thank you for your contribution.
I separated the private repo check & https cloning as it made no sense (to me) to combine these two checks.
The reason they are together (or, were) is that when the https cloning was added, it was added to support private repositories. But, perhaps that's not necessary.
On GitLab the
repo.Private
always seems to befalse
which prevented theuseHttpsClone
from being applied.Interesting, i will have a look at this.
The Public
field populated by the Go GitLab SDK doesn't seem to be working correctly. Here's an example of two projects which I created (one is private, the other is public):
$ GITLAB_TOKEN=glpat-W9wmBwqVeXWoyHyZgbT3 ./gitlab-go-demo | grep "test-project"
NameWithNamespace: Amit Saha / test-project-1-public => Public field: false => Visiblity => public
NameWithNamespace: Amit Saha / test-project-1-private => Public field: false => Visiblity => private
The value of the Public
field in both cases is false which is the bug here and i believe that leads to erroneous behavior in gitbackup too. I will get back to this.
Stop using the Public
attribute for GitLab repositories: https://github.com/amitsaha/gitbackup/pull/78
Thanks @syphernl once again for the fix. I will merge this shortly along with the above PR which stops using the Public
attribute.
I separated the private repo check & https cloning as it made no sense (to me) to combine these two checks. On GitLab the
repo.Private
always seems to befalse
which prevented theuseHttpsClone
from being applied.Tested locally on Gitlab.com and cloning private repos works fine now.