因为mac电脑出现问题,所以自己重新安装了系统。但是发现重装后,git连接不上,出现以下错误:

The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.

RSA key fingerprint is 67:f5:03:b3:45:c2:36:4b:89:ca:0d:d0:bf:c4:db:ee.

Are you sure you want to continue connecting (yes/no)? yes

Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

@         WARNING: UNPROTECTED PRIVATE KEY FILE!          @

@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@

Permissions 0777 for '/Users/hejinlai/.ssh/id_rsa' are too open.

It is required that your private key files are NOT accessible by others.

This private key will be ignored.

bad permissions: ignore key: /Users/hejinlai/.ssh/id_rsa

    之前还以为是证书出现了问题,后来才发现,由于git处于安全性考虑,证书是不能给其他人使用,只限本人使用,所以证书的权限必须是700,于是×××权限:

hejinlai_iMac:.ssh hejinlai$ chmod 700 id*

    修改完后,重新验证,没有出现上述错误了:

hejinlai_iMac:asrSdk hejinlai$ git pull

Already up-to-date.

hejinlai_iMac:asrSdk hejinlai$