I have tried anything I can think of and find online by this point to get it to work but nothing I have tried works.
I am using Windows 10. I already have a repository on GitLab and an SSH-key assigned. And I just want to clone/push/pull the normal stuff.
When I do ssh -Tv git@gitlab.com
I get;
Welcome to GitLab, @user!
.
But when I try to clone the repo using
git clone git@gitlab.com:user/my-repo.git
I get;
git@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.
This is my config in .ssh, saw some people solving their problem by doing this.
Host gitlab.com
User git
Hostname gitlab.com
IdentityFile ~/.ssh/id_ed25519
Preferredauthentications publickey
TCPKeepAlive yes
IdentitiesOnly yes
I have also tried using the GitLab Personal token with GitLab workflow on vsc and I can see the repo when I use the menu under Git Clone > Clone from GitLab > user/my-repo
.
I can also Open remote repo using the GitLab workflow on vsc, and I can see my code.
When trying to clone the repo using
git clone https://gitlab.com/user/my-repo.git
I get;
remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'read_repository' or 'write_repository' scope for Git over HTTP.
remote: You can generate one at https://gitlab.com/-/profile/personal_access_tokens
fatal: Authentication failed for 'https://gitlab.com/user/my-repo.git/'
I have remade the ssh keys multiple times both rsa and ed25519, I have removed and added a new personal token nothing works.
Does anyone have had the same problems? How did you solve it? I've seen
I have replaced my username and repo name with user and my-repo.