Mirroring Push Issue: "Failed to add ECDSA host key for ip address [x.x.x.x] to the list of known host (/tmp/something) .. permission denied"
Summary
While Mirroring repositories ssh doesn't work
Steps to reproduce
Input git ssh://... url Direction -> push Click detect host keys Authentication method -> key Click -> "Mirror Repository"
What is the current bug behavior?
Faied to add host key Error shows there is not permission in /tmp/gitlab-shell-knownhostsxxx permission denied
What is the expected correct behavior?
It should add host key with proper permission on /tmp and able login to remote server for push.
Relevant logs and/or screenshots
13:close stream to gitaly-ruby: rpc error: code = Unknown desc = Gitlab::Git::RepositoryMirroring::RemoteError: Failed to add the ECDSA host key for IP address ' (closed);[x.x.x.x]:xx' (closed); to the list of known hosts (/tmp/gitlab-shell-known-hosts20200823-xxxx-rq74nr). Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists. . debug_error_string:{"created":"@15981689xx.6479578xx","description":"Error received from peer ipv4:10.221.2.149:9999","file":"src/core/lib/surface/call.cc","file_line":1055,"grpc_message":"close stream to gitaly-ruby: rpc error: code = Unknown desc = Gitlab::Git::RepositoryMirroring::RemoteError: Failed to add the ECDSA host key for IP address ' (closed);[x.x.x.x]:xx' (closed); to the list of known hosts (/tmp/gitlab-shell-known-hosts20200823-26878-rq74nr).\r\nPermission denied, please try again.\r\nPermission denied, please try again.\r\nPermission denied (publickey,password).\r\nfatal: Could not read from remote repository.\n\nPlease make sure you have the correct access rights\nand the repository exists.\n","grpc_status":13}