Github私人团队独立的SSH密钥 [英] Github Private Team Separate SSH Keys

查看:269
本文介绍了Github私人团队独立的SSH密钥的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Github上有个人帐户。所以做一群同事。我们在Github上为我的团队创建了一个私人团队。我们希望限制对公司笔记本电脑的私人回购



执行此操作的一种方法是将ssh密钥限制为设备。但是,我不确定GitHub是否允许用于私人项目的Key-sandboxing。



总之,我可以在GitHub上建立一个私人团队(并将SSH密钥),这样我就不能错误地使用我的个人笔记本电脑访问代码?
$ b

(这不是一个安全问题,如果我想成为邪恶,并且无论如何都可以在我的个人笔记本电脑上访问这些代码,我可以很轻松地做到这一点。) 解决方案

在你想象的每个设备上生成不同的密钥


一种方法是限制设备的ssh密钥


你只需在每个设备上存储不同的密钥,并在不希望存取的设备上设置ssh密钥即可。






只需按照以下步骤操作,即可立即设置您的ssh密钥:


  • 生成一个新的ssh密钥(或者如果您已经有密钥,则跳过此步骤)

    ssh-keygen -t rsa -Cyour @ email


  • 将密钥设置在 home / .ssh 目录(或在Windows下 Users /< your user> .ssh ),打开并复制内容






  • 如何将sh key添加到github帐户?




  • 登录到github账户

  • 点击右上角的管理员(设置)


  • 点击 SSH密钥


  • 点击添加ssh密钥


  • 粘贴您的密钥并保存



然后您就可以开始: - )


I have an personal account on Github. So do a bunch of coworkers. We created a private team on Github for my team. We'd like to restrict access to the private repos to company laptops.

One way to do this is to limit to ssh keys for the devices. However, I am not sure if GitHub allows Key-sandboxing for private projects.

In short, can I set up a private team on GitHub (and associate SSH keys) such that I cannot, by mistake, access the code using my personal laptop?

(This is not a security question. If I want to be evil and access the code on my personal laptop anyways, I can do it easily.)

解决方案

Its pretty simple. Generate diffrent keys on each device as you figured oout

One way to do this is to limit to ssh keys for the devices

You do it simply by storeing diffrent keys on each device and on the ones you dont want to have acces to dont set up ssh keys.


Simply follow those steps and you will set up your ssh key in no time:

  • Generate a new ssh key (or skip this step if you already have a key)
    ssh-keygen -t rsa -C "your@email"

  • Once you have your key set in home/.ssh directory (or Users/<your user>.ssh under windows), open it and copy the content


How to add sh key to github account?

  • Login to github account
  • Click on the rancher on the top right (Settings)
  • Click on the SSH keys
  • Click on the Add ssh key
  • Paste your key and save

And you all set to go :-)

这篇关于Github私人团队独立的SSH密钥的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆