且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在powershell中自动执行github的ssh-keygen

更新时间:2021-11-03 21:50:30

PowerShell似乎删除了空的双层电子报,并可能需要逃避它们。使用而不是似乎有效。另外,我相信你应该使用 -P (密码短语),而不是 -N )。所以最后的命令行应该是 ssh-keygen -t rsa -C$ MyEmailAddress-fid_rsa_test-P

PowerShell seems to remove the empty double quotes and probably requires to escape them. Using """" instead of "" seems to work. Also, I believe one should use -P (passphrase) instead of -N (new passphrase in case you change it). So the final command line would be ssh-keygen -t rsa -C "$MyEmailAddress" -f "id_rsa_test" -P """".