[email protected]: 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. code example

Example 1: [email protected]: permission denied (publickey,keyboard-interactive)

Go to "Git Bash" just like cmd. Right click and "Run as Administrator".
Type ssh-keygen
Press enter.
It will ask you to save the key to the specific directory.
Press enter. It will prompt you to type password or enter without password.
The public key will be created to the specific directory.
Now go to the directory and open .ssh folder.
You'll see a file id_rsa.pub. Open it on notepad. Copy all text from it.
Go to https://gitlab.com/profile/keys .
Paste here in the "key" textfield.
Now click on the "Title" below. It will automatically get filled.
Then click "Add key".

Now give it a shot and it will work for sure.

Example 2: [email protected]: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

git remote -v
git remote set-url origin https://github.com/USERNAME/REPO.git

Example 3: reported error code “128” when it ended: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.

ssh-keygen -t rsa -b 2048 -C "[email protected]"