Skip to content

ssh: Log error on git command failure

Will Chandler (ex-GitLab) requested to merge wc-ssh-err-log into master

If the git upload-pack process forked by SSHUploadPack or git upload-archive from SSHUploadArchive exits with a non-zero return code, the result of executing stream.Send to respond to the client will be returned, causing the request to be seen as successful by Gitaly.

Clients will correctly receive the non-zero return code, but a status of OK will be logged and the grpc_server_handled_total metric will increment for grpc_code=OK.

This MR corrects SSHUploadPack and SSHArchivePack to return an error when git fails.

Closes #3865 (closed)

Edited by Will Chandler (ex-GitLab)

Merge request reports

Loading