1

I have created a central bare repository somewhere, and upload my project (following this answer).

Now, I believe another person with access to the repository can clone or pull the contents. No problem with that. My question is, if he modifies the project and commits it, can he push this to the repository?

Also, is there a way to control this?

--

btw, I did not use the 'u' flag in git push -u origin master . What was that flag for?

KansaiRobot
  • 7,564
  • 11
  • 71
  • 150
  • [Protect push with a password](https://stackoverflow.com/search?q=%5Bgit%5D+protect+repository+password). – phd Nov 29 '18 at 08:20
  • https://stackoverflow.com/questions/533658/can-i-run-a-password-protected-read-only-git-server – phd Nov 29 '18 at 08:20
  • https://stackoverflow.com/search?q=%5Bgit%5D+%22push+-u%22 – phd Nov 29 '18 at 08:21
  • So by default, anybody can push... – KansaiRobot Nov 30 '18 at 01:39
  • There is no default because there is no One True Way to host repositories. There are 3 popular ways: small self-hosting (using `git-daemon`, `gitweb` or `cgit` that don't allow pushing at all even for the owner), big self-hosting (using `gitolite` over `ssh` or self-hosted web solutions like `pagure` or `gitlab`) and major hosting providers like `github.com`/`gitlab.com`. The latter 2 options (big self-hosting and major hosting providers) allow one to configure who can pull and who can push. – phd Nov 30 '18 at 05:48

0 Answers0