Windows - ssh-kengen executable file not found in %PATH% #5567

Closed
opened 2025-11-02 06:29:11 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @kani on GitHub (Jun 17, 2020).

  • Gitea version (or commit ref): 1.11.6 built with GNU Make 4.1, go1.13.11
  • Git version: git version 2.24.0.windows.2
  • Operating system: WINDOWS SERVER 2012 R2
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:
    2020/06/17 08:25:17 ...user/setting/keys.go:96:KeysPost() [E] AddPublicKey: calcFingerprintSSHKeygen: 'ssh-keygen -lf C:\Windows\TEMP\gitea_keytest389891466' failed with error 'exec: "ssh-keygen": executable file not found in %PATH%':

Description

Fresh install, while adding ssh public key, it is throwing 500 error code. Checked the logs, it shows above message in the log.

Restarted the entire server once to make sure PATH is updated.

before and after restarting the server, I tried ssh-kengen on server, it is executing the binary ok. For some reason Gitea is not finding it right. Any help appreciated!

Screenshots

image

image

Originally created by @kani on GitHub (Jun 17, 2020). - Gitea version (or commit ref): 1.11.6 built with GNU Make 4.1, go1.13.11 - Git version: git version 2.24.0.windows.2 - Operating system: WINDOWS SERVER 2012 R2 - Database (use `[x]`): - [ ] PostgreSQL - [x] MySQL - [ ] MSSQL - [ ] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [X] Not relevant - Log gist: 2020/06/17 08:25:17 ...user/setting/keys.go:96:KeysPost() [E] AddPublicKey: calcFingerprintSSHKeygen: 'ssh-keygen -lf C:\Windows\TEMP\gitea_keytest389891466' failed with error 'exec: "ssh-keygen": executable file not found in %PATH%': ## Description Fresh install, while adding ssh public key, it is throwing 500 error code. Checked the logs, it shows above message in the log. Restarted the entire server once to make sure PATH is updated. before and after restarting the server, I tried ssh-kengen on server, it is executing the binary ok. For some reason Gitea is not finding it right. Any help appreciated! ## Screenshots ![image](https://user-images.githubusercontent.com/163713/84924532-43596c80-b08e-11ea-8866-bbaa62ca77ff.png) ![image](https://user-images.githubusercontent.com/163713/84924467-2de44280-b08e-11ea-8619-0f80344c5fcd.png) <!-- **If this issue involves the Web Interface, please include a screenshot** -->
Author
Owner

@lafriks commented on GitHub (Jun 17, 2020):

Could it be that it is not in system path

@lafriks commented on GitHub (Jun 17, 2020): Could it be that it is not in system path
Author
Owner

@kani commented on GitHub (Jun 17, 2020):

@lafriks thanks! that fixed it.

I had to add the path under System PATH, it was in User's path. And restarted the Windows service. Thanks for the quick response.

@kani commented on GitHub (Jun 17, 2020): @lafriks thanks! that fixed it. I had to add the path under System PATH, it was in User's path. And restarted the Windows service. Thanks for the quick response.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#5567