I can download my code by http but can not clone by ssh

I added my SSH key to the account, but when I use git clone user@server:user/git, the terminal told me I can’t download via ssh, and asked me to make sure that the repo is existed and check whether I have the right to access it. What’s wrong?

What error are you getting when you attempt to clone via ssh?

It reports fatal: Unable to access '<url>':Recv failure: Connection reset by peer, after I shutdown http.proxy for git, it reports Failed to connect to host port <port>: Operation timed out