-2

I want build a blog website which build on git to save all user's blogs.Every user has a git repository in my git host.
Currently, I'm use nginx and git-http-backend to communicate git repo files.

So, how to set username and password for every user's git repository which make it as private?

In other word, is there a way to config which user can do what kind of operation(pull/push/...) on a git? (sorry for my English)

Thanks a lot.

LoranceChen
  • 2,453
  • 2
  • 22
  • 48
  • 1
    Sorry, but [we are not customer support for GitHub](https://meta.stackoverflow.com/questions/255745/why-were-not-customer-support-for-your-favorite-company). If you want to setup accounts/security/etc, you'll need to ask about it on their forums. – JDB Jan 22 '18 at 15:06
  • Some helpful GitHub articles... [Inviting collaborators to a personal repository](https://help.github.com/articles/inviting-collaborators-to-a-personal-repository/) and [Permission levels for a user account repository](https://help.github.com/articles/permission-levels-for-a-user-account-repository/) – JDB Jan 22 '18 at 15:12
  • Hi, @JDB, I have remove the part of Company specify question. forbid is meaningful. – LoranceChen Jan 22 '18 at 15:22
  • Git does not have any built-in security. If you need to manage accounts, protect branches or restrict access, you'll need to use a git server with those features, like GitHub. If you need help setting up or managing those features, then you need to reference their online documentation or contact their customer support. – JDB Jan 22 '18 at 15:30
  • @JDB I want build a website like Github on my host but just for write blog – LoranceChen Jan 22 '18 at 15:42
  • In that case... if you are asking how to build a site from scratch, then your question is [too broad](https://stackoverflow.com/help/closed-questions). If you are asking for a tool or service recommendation, then your question is [off-topic](https://stackoverflow.com/help/on-topic). – JDB Jan 22 '18 at 16:11
  • Possible duplicate of [How to serve GIT through HTTP via NGINX with user/password?](https://stackoverflow.com/questions/6414227/how-to-serve-git-through-http-via-nginx-with-user-password) – phd Jan 22 '18 at 16:26

1 Answers1

0

Use gitolite or gitlab to serve your git repositories.

Both of these projects are git servers (e.g : they manage push / pull / clone actions), with user access built on top.

gitlab may be too big for what you describe in this question, but it comes with a nice GUI.

LeGEC
  • 46,477
  • 5
  • 57
  • 104