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

case where GITLAB_PRIVATE_TOKEN isn't set #14

Open
mhow2 opened this issue May 14, 2018 · 4 comments
Open

case where GITLAB_PRIVATE_TOKEN isn't set #14

mhow2 opened this issue May 14, 2018 · 4 comments

Comments

@mhow2
Copy link
Contributor

mhow2 commented May 14, 2018

When I run the tool without setting GITLAB_PRIVATE_TOKEN (but with valid group and url) it returns the following:

DONE [2018-05-14 12:26:57.742102861 +02:00]: 0/0

I would mind if this message could be more detailed about what's being DONE ?

@bachp
Copy link
Owner

bachp commented May 16, 2018

GITLAB_PRIVATE_TOKEN is optional as it is not needed if the group is public.

In your case git-mirror did 0/0 tasks DONE. This most probably means your group is public but there are no public projects in it.

I'm not sure what could be done here as there is no way to differentiate between a forotten GITLAB_PRIVATE_TOKEN variable and a user who just uses a public repository.

@mhow2
Copy link
Contributor Author

mhow2 commented May 17, 2018

This most probably means your group is public but there are no public projects in it.

You're right, again :)
I'm just realizing that I don't need GITLAB_PRIVATE_TOKEN to be set at all when planning to sync public group/projects only... It is then just a matter of authenticating with git push.

I'm not sure what could be done here as there is no way to differentiate between a forgotten GITLAB_PRIVATE_TOKEN variable and a user who just uses a public repository.

I'm unsure what is the most common use of the tool about either private or public projects.
Anyway what about displaying a notice, maybe in verbose mode ? like:

_Notice:_ GITLAB_PRIVATE_TOKEN env variable is not set - the tool is running into gitlab anonymously. Expected projects with private or internal permissions won't be seen

(Low priority)

@mhow2
Copy link
Contributor Author

mhow2 commented Sep 23, 2020

Hi @bachp,

Not sure why "help wanted" is set but If you want you can close this issue. This being said I like the idea to display a Notice in verbose mode. Do as you like ;)

@bachp
Copy link
Owner

bachp commented Sep 24, 2020

@mhow2 "help wanted" is here because I'm open to MRs should somebody implement this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants