mirror of
				https://github.com/go-gitea/gitea.git
				synced 2025-10-31 21:28:11 +09:00 
			
		
		
		
	Allow ssh-keygen on Windows to detect ssh key type (#14413)
This commit is contained in:
		| @@ -223,11 +223,6 @@ func writeTmpKeyFile(content string) (string, error) { | |||||||
|  |  | ||||||
| // SSHKeyGenParsePublicKey extracts key type and length using ssh-keygen. | // SSHKeyGenParsePublicKey extracts key type and length using ssh-keygen. | ||||||
| func SSHKeyGenParsePublicKey(key string) (string, int, error) { | func SSHKeyGenParsePublicKey(key string) (string, int, error) { | ||||||
| 	// The ssh-keygen in Windows does not print key type, so no need go further. |  | ||||||
| 	if setting.IsWindows { |  | ||||||
| 		return "", 0, nil |  | ||||||
| 	} |  | ||||||
|  |  | ||||||
| 	tmpName, err := writeTmpKeyFile(key) | 	tmpName, err := writeTmpKeyFile(key) | ||||||
| 	if err != nil { | 	if err != nil { | ||||||
| 		return "", 0, fmt.Errorf("writeTmpKeyFile: %v", err) | 		return "", 0, fmt.Errorf("writeTmpKeyFile: %v", err) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user