Cannot add SSH key to user #365

Closed
opened 2025-11-02 03:20:21 -06:00 by GiteaMirror · 1 comment
Owner

Originally created by @donbecker on GitHub (Feb 18, 2017).

  • Gitea version (or commit ref): 1.0.1, windows-4.0-amd64
  • Git version: 2.10.2
  • Operating system: Win Server 2016
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

Attempting to add an SSH key to a user results in a 505 error.

Log entry:

2017/02/18 11:46:48 [...ters/user/setting.go:359 SettingsSSHKeysPost()] [E] AddPublicKey: addKey: 'ssh-keygen -lf C:/Users/svcgitea/AppData/Local/Temp/761363500/id_rsa.pub' failed with error 'exec: "ssh-keygen": executable file not found in %PATH%': exec: "ssh-keygen": executable file not found in %PATH%

Originally created by @donbecker on GitHub (Feb 18, 2017). - Gitea version (or commit ref): 1.0.1, windows-4.0-amd64 - Git version: 2.10.2 - Operating system: Win Server 2016 - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description Attempting to add an SSH key to a user results in a 505 error. Log entry: 2017/02/18 11:46:48 [...ters/user/setting.go:359 SettingsSSHKeysPost()] [E] AddPublicKey: addKey: 'ssh-keygen -lf C:/Users/svcgitea/AppData/Local/Temp/761363500/id_rsa.pub' failed with error 'exec: "ssh-keygen": executable file not found in %PATH%': exec: "ssh-keygen": executable file not found in %PATH%
GiteaMirror added the issue/not-a-bug label 2025-11-02 03:20:21 -06:00
Author
Owner

@donbecker commented on GitHub (Feb 18, 2017):

The issue was that Gitea process on the server could not find ssh-keygen on the path.

Added the path to the PATH environment variable:

C:\Program Files\Git\usr\bin

Adding SSH key to user now works correctly.

@donbecker commented on GitHub (Feb 18, 2017): The issue was that Gitea process on the server could not find ssh-keygen on the path. Added the path to the PATH environment variable: C:\Program Files\Git\usr\bin Adding SSH key to user now works correctly.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#365