permission denied (publickey). gitlab 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: git clone permission denied (publickey)

// Run the following command to generate a key
// Press return to keep all default options
ssh-keygen

// By default the key will be saved to ~/.ssh/id_rsa.pub
// Copy the contents of this file and save it in the following location
// Gitlab: `User Settings > SSH Keys`
// GitHub: `Settings > SSH and GPG Keys`

// To test the SSH authentication use the following command
ssh -T [email protected]

Tags:

Misc Example