简体   繁体   English

Windows Ubuntu Bash SSH进入Github

[英]Windows Ubuntu Bash SSH into Github

I am having trouble using SSH with Window's Ubuntu Bash version 14.04. 我在使用Window的Ubuntu Bash版本14.04时遇到问题。 Here are the steps I took 这是我采取的步骤

  1. Generated a SSH key and it is in ~/.ssh/id_rsa 生成SSH密钥,它位于〜/ .ssh / id_rsa中
  2. I added the key in id_rsa.pub to Github 我将id_rsa.pub中的密钥添加到Github
  3. I ran ssh-add to add the key to bash 我运行ssh-add将密钥添加到bash

However, when I try to clone a private repository (that I have permissions to use, and can load in my browser) I get an error "Permission Denied (publickey)". 但是,当我尝试克隆私有存储库(我有权使用,并可以在我的浏览器中加载)时,我收到错误“Permission Denied(publickey)”。

Here is what I have verified/double checked: 这是我验证/双重检查:

  1. The key is correct on Github 关键在Github上是正确的
  2. The key is correct locally 关键在本地是正确的
  3. The filepath is correct 文件路径是正确的
  4. My user "Chinnick967" owns the directories so it's not a root ownership problem 我的用户“Chinnick967”拥有这些目录,因此它不是根所有权问题
  5. I have set the permissions to at least 700 我已将权限设置为至少700
  6. Bash has the key loaded when I check with ssh-add -l 当我使用ssh-add -l检查时,Bash已加载密钥

Anyone have any ideas? 有人有想法么?

运行ssh -vT git@github.com的结果

You should use git as username. 你应该使用git作为用户名。 In this case 在这种情况下

User git

That should create the keys, you can check https://help.github.com/articles/generating-ssh-keys/ 这应该创建密钥,你可以检查https://help.github.com/articles/generating-ssh-keys/

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

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