12

Using special SSH key for Git

 2 years ago
source link: https://fann.im/blog/2019/07/23/git-special-ssh-key/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Using special SSH key for Git

Jul 23, 2019

In ~/.ssh/config:

host github.com
    HostName github.com
    IdentityFile ~/.ssh/id_rsa_github
    User git

don’t forget chmod 600 ~/.ssh/config

Or, use GIT_SSH_COMMAND environment variable:

export GIT_SSH_COMMAND="ssh -i ~/.ssh/id_rsa_example -F /dev/null"

Was this page helpful?


Recommend

  • 46
    • www.tuicool.com 6 years ago
    • Cache

    Generating an SSH key on Windows

    I needed an SSH key. First I needed to the WSL subsystem, and once I had that working, I could do the work I needed to do: get an SSH key. There is a utility to help with this on Linux, called ssh-keygen. You run this at...

  • 16
    • lunashu.org 4 years ago
    • Cache

    git clone 指定 ssh-key

    git clone 指定 ssh-key 其实我们往往会遇到这样一个问题 打个比方: 公司邮箱是:[email protected] 个人邮箱:[email protected] & [email protected] 我们分别有:公司git仓库 / github仓库...

  • 32
    • www.cnblogs.com 4 years ago
    • Cache

    指定ssh key访问git

    最近在用git,感觉每次输入密码很不方便,想借助ssh key来实现(一种类似ssh命令中-i参数的机制)。现在问题解决了,这里总结下(从建库开始),也方便我以后查阅。 建立一个私有仓库 这里以test1目录示例:1、创建test1文件夹 ...

  • 13
    • www.vidarholen.net 4 years ago
    • Cache

    What’s in a SSH RSA key pair?

    What’s in a SSH RSA key pair? You probably have your own closely guarded ssh key pair. Chances are good that it’s based on RSA, the default choice in ssh-keygen. RSA...

  • 19
    • www.devdungeon.com 4 years ago
    • Cache

    How to Specify SSH key for Git repository

    Introduction If you are using SSH keys with Git to clone and pull your repositories, you may have to manage several SSH keys. For example, it is common to setup a "deploy key" in GitHub (Repository | Settings | Deploy Keys

  • 18

    還原被碼掉的 PEM 資訊 (SSH RSA key) 在「Recovering a full PEM Private Key when half of it is redacted」這邊看到的,起因是

  • 12

    设置Linux系统SSH-KEY访问方式设置 作者: wencst 分类: linux,Uncategorized 发布时...

  • 8
    • www.vultr.com 3 years ago
    • Cache

    Connect to a Server Using an SSH Key

    <?xml encoding="utf-8" ??>This Quickstart Guide describes how to connect to Vultr servers over SSH with a key instead of a password. Prerequisites You will need: A Linux, M...

  • 8
    • calebhearth.com 2 years ago
    • Cache

    Signing Git Commits with Your SSH Key

    Signing Git Commits with Your SSH Key November 15, 2021 You may already be signing your Git commits with a

  • 6

    首先做个说明生成一对默认的私钥公钥,私钥自己客户端留着用,公钥可以给多个平台用。多对私钥公钥,主要是应对一个平台多个账号的情况。当然你想每个平台使用不同的私钥公钥也是可以的。多次生成私钥公钥需要自己重新命名,否则会覆...

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK