WebFaction
Community site: login faq

I need to create a git repository and provide https access to two groups of users. The first group will have read only access, while the other group have read/write access. I don't want any anonymous access (private repo).

All I can find in docs is how to have anonymous read-only and authenticated read-write.

Also I would prefer to use .htpasswd authentication (if possible).

As an alternative a repo with read-only authenticated https access and read-write SSH access would also be acceptable.

Thanks in advance for any help Panayotis

asked 14 Mar, 11:20

arion_p
111
accept rate: 0%


You can't provide granular permissions via HTTP. HTTP works via a combo of htaccess rules and file system permissions, but the file permissions are only for 1 user, your primary account user which apache uses for CGI.

When you use SSH you can designate separate file permissions for each user. You may want to review the docs for setting up git on a server and file permissions with setfacl.

permanent link

answered 14 Mar, 21:23

johns ♦♦
5.2k211
accept rate: 22%

edited 14 Mar, 21:23

I was hoping to avoid creating separate SSH users. It is not a problem to have SSH users for those needing read/write access, but the users with read-only access are external (customers) and I don't want to give them SSH.

If I could make https access read-only (but authenticated through htpasswd), then I could create SSH users for read/write access only.

(15 Mar, 09:36) arion_p

It is not possible to have such a policy using gitweb without medlying extensively with its configuration and the filesystem's permissions.

You should consider deploying a tool like gitolite for SSH access, which can work even for external devs/customers, as long as they have a public ssh key to provide you with.

Else, there are various github/gitlab opensource implementations that provide such functionality, like gogs, gitbucket, kallithea, or pagure.

(15 Mar, 12:50) iliasr ♦♦

Gitolite sounds good. I'll give it a try.

(15 Mar, 13:43) arion_p

Gitolite asks for an ssh user. You can create one at the 'SSH/SFTP users' dashboard tab.

(15 Mar, 13:56) iliasr ♦♦
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×109
×62

question asked: 14 Mar, 11:20

question was seen: 259 times

last updated: 15 Mar, 14:00

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM