A "Permission denied" error means that the server rejected your connection. There could be several reasons why, and the most common examples are explained below.

Should the sudo command be used with Git?

You should not be using the sudo command with Git. If you have a very good reason you must use sudo, then ensure you are using it with every command (it's probably just better to use su to get a shell as root at that point). If you generate SSH keys without sudo and then try to use a command like sudo git push, you won't be using the same keys that you generated.