Could not generate ssh public key for heroku in Windows 7

前端 未结 4 1406
不知归路
不知归路 2021-02-12 01:55

While I am trying heroku login through cmd in my machine, it says

Could not find existing public key
Would you like to generate one? [

4条回答
  •  孤独总比滥情好
    2021-02-12 02:11

    For Win7 64-bit users, the file %HerokuPath%s\bin\ssh-keygen.bat looks like:

    @SETLOCAL
    @SET HOME=%USERPROFILE%
    @"%HerokuPath%\..\Git\bin\ssh-keygen.exe" %*
    

    But Heroku installs Git in Program Files (x86), so if you update the .bat file to:

    @SETLOCAL
    @SET HOME=%USERPROFILE%
    @"C:\Program Files (x86)\Git\bin\ssh-keygen.exe" %*
    

    Then you should be able to generate your ssh keys.

提交回复
热议问题