ITKeyword,专注技术干货聚合推荐

注册 | 登录

github - Git "server", manage access via SSH keys

itPublisher 分享于

2020腾讯云10周年活动,优惠非常大!(领取2860元代金券),
地址https://cloud.tencent.com/act/cps/redirect?redirect=1040

2020阿里云最低价产品入口,含代金券(新老用户有优惠),
地址https://www.aliyun.com/minisite/goods

推荐:git on server(ssh)深入剖析,github提供服务原理

1.安装好linux,安装好Git(192.168.1.239) 2.创建一个用户zph(让此用户提供git on server),密码设置为12345678 [python] view plain copy # useradd zph  

It was unexpectedly easy to set up a remote repository on my VPS. I want to give some people read access , some other people read and write access to one or multiple repositories. And they should all connect via the git user, like on GitHub or BitBucket.

How can you specify the access permissions, not bound to the system's users but to the SSH key they are using? For instance, everyone can read from a public repository on GitHub, but not necessarily write. Though they all would clone it via git clone git@github.com:YourName/repo_name.git. So it can't be managed via Unix user/group/world permissions.

Also, SSH shell access is disabled.

$ ssh git@github.com
Hi YourName! You've successfully authenticated, but GitHub does not provide shell access.

How can I reproduce this "behaviour" on my VPS?

git github ssh vps
|
  this question
asked Oct 11 '14 at 9:36 Niklas R 5,053 12 47 108

 | 

1 Answers
1

You can reproduce (with even a greater degree of control) with and authorization layer like gitolite.

It is a perl script made to work with ssh and ssh key, allowing you to define groups (of people and of repos), and putting access control levels with those groups.

See "How do programs like gitolite work?".


|
  this answer
answered Oct 11 '14 at 14:46 VonC 668k 215 1964 2086

 | 


相关阅读排行


相关内容推荐

最新文章

×

×

请激活账号

为了能正常使用评论、编辑功能及以后陆续为用户提供的其他产品,请激活账号。

您的注册邮箱: 修改

重新发送激活邮件 进入我的邮箱

如果您没有收到激活邮件,请注意检查垃圾箱。