git id_rsa are too open的解决办法

转载 2015年11月19日 15:50:19


Somehow I've managed to get myself into a position where when I try to clone a repository using msysgit, cmd.exe, or Powershell, I get the following error:

> Initialized empty Git repository in
> C:/sandbox/SomeProject/.git/
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
> Permissions 0644 for
> '/c/Users/Ben/.ssh/id_rsa' are too
> open. It is recommended that your
> private key files are NOT accessible
> by others. This private key will be
> ignored. bad permissions: ignore key:
> /c/Users/Ben/.ssh/id_rsa Permission
> denied (publickey). fatal: The remote
> end hung up unexpectedly

You changed the permissions on the whole directory, which I agree with Splash is a bad idea. If you can remember what the original permissions for the directory are, I would try to set them back to that and then do the following

cd ~/.ssh
chmod 700 id_rsa

inside the .ssh folder. That will set the id_rsa file to rwx (read, write, execute) for the owner (you) only, and zero access for everyone else.

If you can't remember what the original settings are, add a new user and create a set of SSH keys for that user, thus creating a new .ssh folder which will have default permissions. You can use that new .ssh folder as the reference for permissions to reset your .ssh folder and files to.

If that doesn't work, I would try doing an uninstall of msysgit, deleting ALL .ssh folders on the computer (just for safe measure), then reinstalling msysgit with your desired settings and try starting over completely (though I think you told me you tried this already).

Edited: Also just found this link via Google -- Fixing "WARNING: UNPROTECTED PRIVATE KEY FILE!" on Linux While it's targeted at linux, it might help since we're talking liunx permissions and such.

openstack环境中,ssh登录虚拟机提示are too open

openstack环境中,ssh登录虚拟机提示are too open 【问题描述】 在openstack中部署cloudfoundry,在其中一台虚拟机上使用key...
  • u010412301
  • u010412301
  • 2017年04月25日 15:46
  • 267

Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open处理

如果出现 Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open. 等错误显示了,原来只要把权限降到0600就ok了 输入命令 chmod 06...
  • menglei8625
  • menglei8625
  • 2012年03月26日 15:01
  • 15606

Permissions 0644 for '/Users/henryj/.ssh/id_dsa' are too open. 错误解决方案

今天在macbook pro上用sourcetree链接gitlab,一直链接不上,报错: Permissions 0644 for '/Users/henryj/.ssh/id_dsa' are ...
  • huihuangjiuai
  • huihuangjiuai
  • 2015年03月19日 14:35
  • 1969

Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open处理

如果出现 Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open. 等错误显示了,原来只要把权限降到0600就ok了 输入命令chmod 0600...
  • u012599988
  • u012599988
  • 2016年06月27日 14:26
  • 2497


这几天重装了系统,发现本机sshd服务开启但是其他机器不能登陆,看了一下/var/log/auth.log的日志,出现很多下面这样的错误: Sep 28 20:59:38 localhost ssh...
  • WinWill2012
  • WinWill2012
  • 2014年09月28日 21:05
  • 2392

Permissions 0644 for ‘.ssh/id_rsa’ are too open处理

  • xbl1986
  • xbl1986
  • 2011年05月20日 11:46
  • 4582

Permissions 0644 for ‘/root/.ssh/id_rsa’ are too open处理

原文地址:: 相关文章 1、Permissions 064...
  • xqhrs232
  • xqhrs232
  • 2017年06月23日 10:31
  • 170

git_err:Permissions 0777 for '/home/wa/.ssh/id_rsa' are too open.

把原来电脑的ssh文件拷贝到另一个机器上,只需要修改一下用户名和用户emil就可以使用了,但是这次出现错误: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@...
  • u010383937
  • u010383937
  • 2017年08月21日 16:16
  • 674

Linux 中的权限 -- 0755 和 0644 Linux 系统中采用三位十进制数表示权限,如0755, 0644. AB...
  • scdxmoe
  • scdxmoe
  • 2016年04月29日 10:35
  • 1486

Permissions 0777 for ‘***’ are too open.

见了鬼了,又遇到这种ssh秘钥问题。。异常显示: @@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ @ WAR...
  • Dcatfly
  • Dcatfly
  • 2017年07月16日 13:59
  • 768
您举报文章:git id_rsa are too open的解决办法