简体   繁体   English

在 ubuntu 上使用 ssh github 键时如何修复错误?

[英]How to fix error when using ssh github keys on ubuntu?

The problem is I have ssh keys already working on my local disk but, when I am going to use Ubuntu, it doesn't let me use the keys like shown in this images:问题是我的本地磁盘上已经有 ssh 个密钥,但是当我要使用 Ubuntu 时,它不允许我使用如下图中所示的密钥:

This is my local disk ssh keys:这是我的本地磁盘 ssh 键:

本地磁盘 ssh 密钥

This is the carpet ssh but on Ubuntu folder:这是地毯 ssh 但在 Ubuntu 文件夹上:

地毯 ssh 但在 Ubuntu 文件夹上

When I am going to request a git clone with ssh it doesn't work:当我要使用 ssh 请求 git 克隆时,它不起作用:

Ubuntu 失败的 SSH

The best practice is to:最佳做法是:

  • regenerate a new set of SSH key pair on your Ubuntu session, instead of reusing existing keys: that way, you can better identify which account is using/accessing your GitHub data.在您的 Ubuntu session 上重新生成一组新的 SSH 密钥对,而不是重复使用现有密钥:这样,您可以更好地识别哪个帐户正在使用/访问您的 GitHub 数据。
  • register the new SSH public key on your GitHub account在您的 GitHub 帐户上注册新的 SSH 公钥

In your Ubuntu session:在您的 Ubuntu session 中:

ssh-keygen -t ed25519 -P "" 

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM