如何在Windows 10上使用SSH密钥配置git? [英] How to configure git with SSH keys on Windows 10?

查看:139
本文介绍了如何在Windows 10上使用SSH密钥配置git?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我从以下位置下载并安装了git: https://git-scm.com/downloads .我现在可以在Windows命令提示符上使用git.

I downloaded and installed git from: https://git-scm.com/downloads. I can use git on Windows Command Prompt now.

我下载了puttygen并用它生成了一对RSA密钥,存储在D:\rsa_keys

I downloaded puttygen and used it to generate a pair of RSA keys, stored at D:\rsa_keys

我将公钥添加到了公司的git网站上.

I added the public key to my company's git website.

现在,如何告诉git使用我刚创建的rsa密钥?

Now, how can I tell git to use the rsa key I just created?

推荐答案

我认为您可能需要运行git bash并在那里设置密钥:

I think you may need to run git bash and set keys there:

  1. 启动git bash(最简单的方法:All Programs -> Git -> Git Bash
  2. 在git bash终端中键入ssh-keygen -t rsa.这将生成公钥和私钥对
  3. 转到密钥的位置(建议使用git bash)并打开公共密钥(例如,使用cat),然后将其复制
  4. 使用Account->SSH Keys->Add key
  5. 将公用密钥粘贴到您的github帐户上
  1. Start git bash (the simplest way: All Programs -> Git -> Git Bash
  2. In the git bash terminal type ssh-keygen -t rsa. This will generate public and private key pair
  3. Go to the location of the keys (I'd recommend using git bash for it) and open the public key (with cat, for example), copy it
  4. Paste the public key on your github account using Account->SSH Keys->Add key

我希望这会有所帮助.

这篇关于如何在Windows 10上使用SSH密钥配置git?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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