mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Use ErrKeyUnableToVerify if fail to calc fingerprint in ssh-keygen (#10863)
* Use ErrKeyUnableToVerify if fail to calc fingerprint in ssh-keygen Fix #3985 Signed-off-by: Andrew Thornton <art27@cantab.net> * Pass up the unable to verify
This commit is contained in:
		@@ -92,6 +92,9 @@ func KeysPost(ctx *context.Context, form auth.AddKeyForm) {
 | 
			
		||||
 | 
			
		||||
				ctx.Data["Err_Title"] = true
 | 
			
		||||
				ctx.RenderWithErr(ctx.Tr("settings.ssh_key_name_used"), tplSettingsKeys, &form)
 | 
			
		||||
			case models.IsErrKeyUnableVerify(err):
 | 
			
		||||
				ctx.Flash.Info(ctx.Tr("form.unable_verify_ssh_key"))
 | 
			
		||||
				ctx.Redirect(setting.AppSubURL + "/user/settings/keys")
 | 
			
		||||
			default:
 | 
			
		||||
				ctx.ServerError("AddPublicKey", err)
 | 
			
		||||
			}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user