0

I created a new gitlab repo like this:

git remote add origin <new gitlab repo address>
git push -u origin master

Now "Settings / General / Visibility, project features, permissions / Project visibility" is "private".

Since we create a git repo per customer, this will get done often.

Is there a way to change the default for new projects to "internal"?

We run gitlab on-prem.

guettli
  • 23,964
  • 63
  • 293
  • 556
  • 1
    How about using GitlabCLI as pointed in [this answer](https://stackoverflow.com/a/33692685/4636715) with `visibility_level=10`? – vahdet Sep 18 '19 at 11:49
  • @vahdet it would be less work, if I could change the default once. I guess your solution works, but this need to be done for every new project. – guettli Sep 18 '19 at 12:02

1 Answers1

2

My answer supposes you have a gitlab server on-prem.

Go to Admin Area > Settings and set Default project visibility

enter image description here

This settings is global for all projects in this gitlab instance.

Nicolas Pepinster
  • 4,119
  • 23
  • 44
  • 1
    Unfortunately this answer does not work. It works for repos created via web gui, but not from "git push". See https://stackoverflow.com/a/57395788/633961 – guettli Sep 19 '19 at 07:30