Gitlab ssh is enabled but no longer allows clone/push/etc

Viewed 695

I was able to push to GitLab via SSH until recently. We changed a number of configuration things so I'm having issues sorting out what the issue is. The biggest changes are I'm now on a VPN, the project changed owners, and IPs were restricted. I have a feeling it's something to do with the IP restrictions.

ssh -T git@gitlab.com prints Welcome to GitLab, @myUsername! so the ssh connection is working.

However if I attempt to clone, push, etc. it fails with various errors (added below) but ultimately says Please make sure you have the correct access rights and the repository exists.

I've tried various things (added below), primarily modifying the remote to use my username in various capacities based on other answers I found. None of them work. I am able to push/clone via https.

Is there an IP I need to allow or some other config in gitlab I need to set?

Some of the things I've tried:

git remote add origin git@myUsername.gitlab.com:companyName/projectName.git

git remote add origin git@gitlab.com:companyName/projectName.git

git remote add origin myUsername@gitlab.com:companyName/projectName.git

And their corresponding errors:

ssh: Could not resolve hostname myUsername.gitlab.com: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
remote: 
remote: ========================================================================
remote: 
remote: The project you were looking for could not be found.
remote: 
remote: ========================================================================
remote: 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
myUsername@gitlab.com: Permission denied (publickey,keyboard-interactive).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
1 Answers
Related