How to setup .ssh/config for git on non-standard port

I know something similar has been asked multiple times, but I wasn’t able to find the right solution for my case.

I have a custom git repository accessible via ssh on a non-standard port; URL is something like:

git clone ssh:// 

private key for that repo is in ~/.ssh/myname.prv.

I am trying to get access the repo without passwords, but I’m failing.

My current ~/.ssh/config has a stanza:

Host git     HostName     Port 12345     User myname     IdentityFile ~/.ssh/myname.prv 

… but git still asks for a PW.

What am I missing?

Note: both server and client are fairly recent Linux machines and I’m working at the command line, if it matters.