How to fix Can't Push to gitlab because You Move Project to Another Computer
The authenticity of host 'gitlab.com (0.0.0.0)' can't be established.
ECDSA key fingerprint is SHA blablabla
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,0.0.0.0' (ECDSA) to the list of known hosts.
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
when you try to move the private project from another computer you will necessary upload the new public key of your new computer ssh so, let's configure the ssh.
first certainly, you have installed ssh in your new computer example I using Linux so the ssh in default when you install the computer. check ssh version via terminal with "ssh -V"
second, type on your terminal "ssh-keygen -t rsa -b 2048 -C "youremail@email.com"
and then enter you will get some question but nope you just enter enter enter wkwkwk until close the dialog and get the identification and the public key
third, you need a xclip if you not yet have installed it you should install with "sudo apt-get install xclip"
after installation you can try to type "xclip -sel clip < ~/.ssh/id_ed25519.pub"
last, let's go to gitlab.com and then login go to your icon -> settings -> ssh and then you paste the public key of ssh who saved on your local when generated ssh key above regularly in ~/.ssh/id_ed25519.pub open it and select all the key and then paste to the form in your gitlab. after that enjoy now you can push the code to the gitlab.
The authenticity of host 'gitlab.com (0.0.0.0)' can't be established.
ECDSA key fingerprint is SHA blablabla
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'gitlab.com,0.0.0.0' (ECDSA) to the list of known hosts.
git@gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
when you try to move the private project from another computer you will necessary upload the new public key of your new computer ssh so, let's configure the ssh.
first certainly, you have installed ssh in your new computer example I using Linux so the ssh in default when you install the computer. check ssh version via terminal with "ssh -V"
second, type on your terminal "ssh-keygen -t rsa -b 2048 -C "youremail@email.com"
and then enter you will get some question but nope you just enter enter enter wkwkwk until close the dialog and get the identification and the public key
third, you need a xclip if you not yet have installed it you should install with "sudo apt-get install xclip"
after installation you can try to type "xclip -sel clip < ~/.ssh/id_ed25519.pub"
last, let's go to gitlab.com and then login go to your icon -> settings -> ssh and then you paste the public key of ssh who saved on your local when generated ssh key above regularly in ~/.ssh/id_ed25519.pub open it and select all the key and then paste to the form in your gitlab. after that enjoy now you can push the code to the gitlab.
Comments
Post a Comment