The Username You Entered Is Already in Use. Delete the Response You Entered and Try Again
git@github.com: Permission denied (public cardinal).fatal: Could not read from remote repository. - It ways GitHub is rejecting your connection because -
- It is your private repo
- GitHub does not trust your figurer because it does non have the public key of your computer.
And when you endeavour to clone the repo you get the following error message -
one git@github.com: Permission denied (public key). 2 fatal: Could not read from remote repository. 3 4 Delight brand certain yous have the correct access rights 5 and the repository exists. Non only github but you can face up this upshot on the platform like GitLab, DigitalOcean, here I accept composed the listing of possible solutions -
- GitHub - How to gear up git@github.com: Permission denied (public key)?
- GitLab - How to gear up gitlab.com: permission denied (publickey) fatal: Could non read from remote repository
- BitBucket - Permission denied (public central), tin't clone/clone to bitbucket
- Personal Access Token - How to prepare(GitHub)-Back up for countersign hallmark was removed. Delight use a personal access token instead
1. GitHUb - How to fix this effect?
Step one - Create SSH key pair
One of the easiest means for you to generate a fundamental pair is past running ssh-keygen utility.
Open the command prompt and type in the following
(Note - If yous do not accept ssh-keygen installed on the window then Click hither.)
To keep the ssh-keygen simple, practise not enter any cardinal proper name or passphrase.
1 Generating public/private rsa primal pair. 2 Enter file in which to relieve the key (/Users/rahulwagh/.ssh/id_rsa): 3 Enter passphrase (empty for no passphrase): four Enter aforementioned passphrase once more: 5 Your identification has been saved in /Users/rahulwagh/.ssh/id_rsa. 6 Your public central has been saved in /Users/rahulwagh/.ssh/id_rsa.pub. 7 The cardinal fingerprint is: 8 SHA256:Okq3w+SesCGLQVToSBQru8RdUZtT2EIIrzH5MQ67DWA rahulwagh@local ix The fundamental's randomart paradigm is: 10 +---[RSA 3072]----+ 11 |.ooo..+oo. | 12 | oo o..o+. | 13 | = Eastward = = +. | 14 |*oo X o . | 15 |.+ = o S | sixteen |o. + .. | 17 |o ..+=+ | 18 | o + *++ | nineteen |. . o.+. | 20 +----[SHA256]-----+ Where to find the fundamental pair
The file will be generated at - /Users/rahulwagh/.ssh/
Name of the file - id_rsa.pub
(To generate SSH keys on Windows machine click hither)
Stride two - Calculation SSH primal to your GitHub business relationship
- Goto your GitHub Business relationship -> Settings
- And so look for SSH and GPG keys under **Account Settings -> SSH and GPG keys **
- After that click on New SSH Primal . Assign some meaningful proper name to your fundamental
- To become the cardinal goto to your command prompt and switch directory path
Windows - C:\Users\rahulwagh.ssh\id_rsa.pub
Linux - /Users/rahulwagh/.ssh/id_rsa.pub
Run the following command
-
Copy the content of the key
-
Paste the key within your GitHub account
Now yous tin clone your GitHub repo and information technology will not complain almost git@github.com permission denied (publickey). fatal could not read from remote repository
Benefits of this approach
- You practice not need to supply you GitHub Username and password
- More secured
Drawback
- The process of generating SSH keys is piffling troublesome.
- If you switch your laptop/desktop and then y'all need re-generate the SSH keys over again and perform the same steps onto your new laptop/desktop.
Approach 2 : Using GitHub HTTPS urls
This is one more than approach in which you practice not need to worry about SSH key generation.
You lot need following -
- GitHub repo URL with HTTPS (Ex - https://github.com/rahulwagh/instance.git)
- Your GitHub Username
- Your GitHub Countersign
Run the following control to fix git remote
1 git clone origin https://github.com/rahulwagh/example.git Subsequently that it volition ask for your username and password, supply your username and password.
Once you are authenticated and so you lot tin perform your Git operations.
Benefits of this approach
- You do not need to generate SSH keys
- You do not need to copy your SSH keys to GitHub accounts
- This approach can be used from any Laptop, Desktop. You lot only need to provide your GitHub credentials with this approach.
Drawback
- The only drawback which I can see is you demand to input your GitHub credentials everytime.
ii.1 Multiple public keys inside ~/.ssh directory?
When y'all are working with multiple github repositories and so there is high probability that you might take incorrect public key mentioned within your ~/.ssh directory.
For example I take generated the public primal for my GitLab projection by the name ~/.ssh/id_rsa.gitlab.pub
Simply when I checked my ~/.ssh/config file I noticed the incorrect name of public primal for the gitlab.com
Here is the content of my ~/.ssh/config file where the public key proper noun is ~/.ssh/id_rsa instead of ~/.ssh/id_rsa.gitlab.pub
ane Host gitlab.com 2 Preferredauthentications publickey 3 IdentityFile ~/.ssh/id_rsa How to fix?
To fix this consequence yous should correct the public central proper noun -
1 Host gitlab.com 2 Preferredauthentications publickey 3 IdentityFile ~/.ssh/id_rsa.gitlab.pub 3. Bitbucket - Permission denied (public central), can't clone/clone to bitbucket
There could be multiple reasons backside the issue -
3.1 You did not add together your local SSH keys to BitBucket Settings
SSH keys could exist 1 of the virtually probable reasons which are causing the upshot while working with your BitBucket repository.
You might see the following errors -
ane Permission denied (publickey). or
ane abort: Permission denied: or (In case yous are working with mercury and so y'all might run across this fault message)
1 remote: Permission denied (publickey). ii abort: no suitable response from remote hg! How to fix?
Before we kickoff debugging the event, let's first debug the issue to know the exact reason backside this fault.
Run the following command from your terminal (put your right repository proper name) -
one ssh -T your_bitbucket_repo@domain.com The to a higher place command should return you lot with Username and in case you did not see your username then you need to Create SSH keys and add to your BitBucket account.
Step 1 - Create your Public SSH Keys
Stride two - Goto Your Account -> Manage Account -> SSH Keys
Step iii - Click on Add Key
Stride 4 - Paste your fundamental which you take generated in Step ane.
Step 5 - Finally click on Add Primal
It should piece of work after adding the SSH keys to your BitBucket account.
(Note - Here are some official links from bitbucket if you are interested more - click here)
3.2 Permission on your bitbucket directory
There could also be a possibility that yous do non have permission to access the BitBucket repository. Bank check with your bitbucket administrator with regards to your permission.
If it is the case of permission then your bitbucket administrator could grant the permission.
1.i Generate ssh-keygen on Windows 10
If you are working on a windows motorcar then you need to install the OpenSSH.
Goto: Apps > Apps and Features > Manage Optional Features
Verify the listing of the apps, if it already installed. If not then go at the top of the page so select Add a Feature afterwords -
- OpenSSH Client : Locate
OpenSSH Customer, so clickInstall. - OpenSSH Server : Locate
OpenSSH Server, then clickInstall.
Install OpenSSH using PowerShell on Windows 10
If you similar using Powershell then first make sure OpenSSH features are available to install -
Copy and run the post-obit command
1 Get-WindowsCapability -Online | ? Proper name -like 'OpenSSH*' 2 3 # This should render the following output: four v Name : OpenSSH.Client~~~~0.0.1.0 six State : NotPresent vii Proper name : OpenSSH.Server~~~~0.0.1.0 viii State : NotPresent Afterwards that install server and client features using the following command -
1 # Install the OpenSSH Client 2 Add together-WindowsCapability -Online -Proper name OpenSSH.Client~~~~0.0.1.0 3 4 # Install the OpenSSH Server v Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 six 7 # Both of these should return the following output: 8 ` 9 Path : 10 Online : True 11 RestartNeeded : Faux 1.2 Verify OpenSSH client is installed
- Goto settings panel
- Click on Optional Features and then wait for OpenSSH client, if you can find the OpenSSH client which means you take installed information technology correctly.
ane.3 Generate ssh keys on windows 10
- Next we need to run the
ssh-keygenand for that goto window's command prompt and open information technology in ambassador fashion.
- In the command prompt type the following command
i Generating public/private rsa key pair. ii Enter file in which to save the key (C:\Users\rahulwagh/.ssh/id_rsa): 3 Enter passphrase (empty for no passphrase): four Enter aforementioned passphrase again: 5 Your identification has been saved in C:\Users\rahulwagh/.ssh/id_rsa. 6 Your public fundamental has been saved in C:\Users\rahulwagh/.ssh/id_rsa.pub. 7 The central fingerprint is: 8 SHA256:Okq3w+SesCGLQVToSBQru8RdUZtT2EIIrzH5MQ67DWA rahulwagh@local 9 The cardinal's randomart image is: x +---[RSA 3072]----+ 11 |.ooo..+oo. | 12 | oo o..o+. | 13 | = Eastward = = +. | fourteen |*oo X o . | xv |.+ = o S | 16 |o. + .. | 17 |o ..+=+ | 18 | o + *++ | nineteen |. . o.+. | twenty +----[SHA256]-----+ 21 1.4 Where to find the cardinal pair
The file will exist generated at - C:\Users\rahulwagh.ssh\id_rsa
Proper noun of the file - id_rsa
4. How to prepare(GitHub)-Support for password authentication was removed. Please use a personal admission token instead
GitHub has recently announced their migration to use token-based authentication which ways yous can no longer use your username and password for GtiHub authentication. You lot need to create personal access token to proceed utilize of your GitHub Repository.
Here is my private GitHub repository which I was trying to clone and prompted with the error message -
Before fixing the result lets attempt to sympathise how do you clone your Git Repo - https:// or git@github.com
This outcome is very much dependent on the way you clone your repository.
1. git@github.com:rahulwagh/jhooq.git - If you are using SSH way of cloning the repository and then you will not confront issue related to personal access token. Because when yous use SSH way of clonning so you should always create SSH Keys and copy public SSH cardinal to GitHub SSH and GPG keys
2. https://github.com/rahulwagh/jhooq.git - If y'all are using HTTPS manner of cloning the Git Repository then yous will be prompted with username, password and later entering the username and password you lot will exist thrown with fault Support for password authentication was removed. Please use a personal admission token instead
How to fix the personal access token for GitHub Repository
- Login to your GitHub account from the web browser.
- Goto -> Contour Pic -> Setting
- Afterwards that you should await on the left navigation panel and there should be an selection of Developer Settings
- Aftr that it volition redirect yous to the new page where you will discover an choice Personal Access Token in the left navigation. You should click on it -
- Then next on the correct side of the screen yous take an pick to Generate New Token -
- Enter the token name along with the scopes -
- Finally Generate Token
- At present Copy the generated Token
- Go dorsum to last and re-issue the Git Clone command and instead of password input the access token
It should prepare your issue of - "Support for password authentication was removed. Please use a personal access token instead"
Advantages of using Personal Admission Token
- Potent - The Personal Access Token are randomly generated cord which contains all possible combination of literal, number, upper case, lower case and special symbol. So it is really hard for animate being force attack.
- Meliorate Scoping - With personal admission token you can command the admission level at granular level.
- Multiple Personal Access Token - You tin can more and then ane personal admission token so that you practice not have to share countersign with anyone else.
- Revocable - You can easily revoke the admission to repository by deleting the personal access token.
Source: https://jhooq.com/github-permission-denied-publickey/
0 Response to "The Username You Entered Is Already in Use. Delete the Response You Entered and Try Again"
Mag-post ng isang Komento