i am writing my bachelors thesis at a company and got access to gitlab from the admin, but I am new to Git. I created a new project for my thesis. I already had a folder with some stuff on my computer. I used the following commands in the git bash (as recommended by gitlab):
git init
git remote add origin git@gitlab:USER/TITLE.git
git add [stuff]
git commit
git push -u origin master
Committing was successfull, but the last command created the error
"ssh: connect to host gitlab port 22: Connection refused fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists."
I tried to switch to port 443, because apparently, that is a thing.
ssh -T -p 443 git@altssh.gitlab.com
That got me:
"The authenticity of host '[altssh.gitlab.com]:443 ([35.190.168.187]:443)' can't be established.
ECDSA key fingerprint is [...].
Are you sure you want to continue connecting (yes/no/[fingerprint])?"
After typing yes:
"Warning: Permanently added '[altssh.gitlab.com]:443,[35.190.168.187]:443' (ECDSA) to the list of known hosts.
git@altssh.gitlab.com: Permission denied (publickey)."
When going back to port 22, the connection timed out. The error after the push command is still the same.
According to canyouseeme.org, the ports 22 and 443 are not open.
I also tried to make new rules for the ports in the windows defender firewall menu.
Still the same error. I would really appreciate any help or ideas from you :)
Peter