如何在Windows 10上使用SSH密钥配置git? [英] How to configure git with SSH keys on Windows 10?
本文介绍了如何在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:
- 启动git bash(最简单的方法:
All Programs -> Git -> Git Bash
- 在git bash终端中键入
ssh-keygen -t rsa
.这将生成公钥和私钥对 - 转到密钥的位置(建议使用git bash)并打开公共密钥(例如,使用cat),然后将其复制
- 使用
Account->SSH Keys->Add key
将公用密钥粘贴到您的github帐户上
- Start git bash (the simplest way:
All Programs -> Git -> Git Bash
- In the git bash terminal type
ssh-keygen -t rsa
. This will generate public and private key pair - 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
- Paste the public key on your github account using
Account->SSH Keys->Add key
我希望这会有所帮助.
这篇关于如何在Windows 10上使用SSH密钥配置git?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文