github配置ssh key过程中为啥需要ssh-add这一步呢
看起来是OSX Sierra的特性。
SSH-agent does not automatically load passphrases on the OSX Sierra keychain during startup
不过在config文件中添加了这个属性AddKeysToAgent yes后重启依然不work。。MacBook-Pro-2:.ssh new$ ssh -v git@github.comOpenSSH_7.4p1, LibreSSL 2.5.0debug1: Reading configuration data /Users/new/.ssh/configdebug1: Reading configuration data /etc/ssh/ssh_configdebug1: Connecting to github.com port 22.debug1: Connection established.debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_rsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_rsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_dsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_dsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_ecdsa type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_ecdsa-cert type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_ed25519 type -1debug1: key_load_public: No such file or directorydebug1: identity file /Users/new/.ssh/id_ed25519-cert type -1debug1: Enabling compatibility mode for protocol 2.0debug1: Local version string SSH-2.0-OpenSSH_7.4debug1: Remote protocol version 2.0, remote software version libssh_0.7.0debug1: no match: libssh_0.7.0debug1: Authenticating to github.com:22 as \u0026#39;git\u0026#39;debug1: SSH2_MSG_KEXINIT sentdebug1: SSH2_MSG_KEXINIT receiveddebug1: kex: algorithm: curve25519-sha256@libssh.orgdebug1: kex: host key algorithm: ssh-rsadebug1: kex: server-\u0026gt;client cipher: chacha20-poly1305@openssh.com MAC: \u0026lt;implicit\u0026gt; compression: nonedebug1: kex: client-\u0026gt;server cipher: chacha20-poly1305@openssh.com MAC: \u0026lt;implicit\u0026gt; compression: nonedebug1: expecting SSH2_MSG_KEX_ECDH_REPLYdebug1: Server host key: ssh-rsa SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8debug1: Host \u0026#39;github.com\u0026#39; is known and matches the RSA host key.debug1: Found key in /Users/new/.ssh/known_hosts:5debug1: rekey after 134217728 blocksdebug1: SSH2_MSG_NEWKEYS sentdebug1: expecting SSH2_MSG_NEWKEYSdebug1: SSH2_MSG_NEWKEYS receiveddebug1: rekey after 134217728 blocksdebug1: SSH2_MSG_SERVICE_ACCEPT receiveddebug1: Authentications that can continue: publickeydebug1: Next authentication method: publickeydebug1: Trying private key: /Users/new/.ssh/id_rsadebug1: Trying private key: /Users/new/.ssh/id_dsadebug1: Trying private key: /Users/new/.ssh/id_ecdsadebug1: Trying private key: /Users/new/.ssh/id_ed25519debug1: No more authentication methods to try.
【github配置ssh key过程中为啥需要ssh-add这一步呢】 看起来只能在启动脚本里面手动加上去了
config配置如下Host github.com\tHostName github.com\tUser git\tAddKeysToAgent yes\tUseKeychain yes\tPreferredAuthentications publickey\tIdentityFile /Users/new/.ssh/private_keys/*_s
推荐阅读
- 比亚迪唐|动力配置升级 比亚迪唐EV新增车型将于12月上市
- 汽车知识|长安旗下的B级精品车,动力有T,配置厚道,起步8.49万
- 趣头条|【15周年】豪华舒适的配置,不错的驾驶体验,VV7我不后悔的选择
- 趣头条|底盘硬件配置超高,外形超霸气!岚图首款量产车FREE将亮相
- 无马汽车|动力硬核,配置顶天?场地体验吉利星瑞
- 钟叔驾道|10万以内买SUV,这几款国产精品真心不错,设计精致配置高
- 新浪汽车出品|配置提升是重点 试驾东风日产2021款天籁
- 一起去SUV|6万多就能买的SUV会很差吗?别傻了,这几款款款精品,配置丰富很划算!
- 底盘|底盘硬件配置超高,外形超霸气!国产大厂高端SUV将亮相
- 销量|12.79万起,本田热卖SUV出新款,新配色,配置升级
