Last active
July 9, 2020 11:16
-
-
Save Wiper-R/b4ad1bee09199dbde1bb46af3e29e966 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
"Help, I keep getting a 'Permission Denied (publickey)' error when I push!"
This means, on your local machine, you haven't made any SSH keys. Not to worry. Here's how to fix:
*nix
based command prompt (but not the default Windows Command Prompt!)cd ~/.ssh
. This will take you to the root directory for Git (LikelyC:\Users\[YOUR-USER-NAME]\.ssh\
on Windows).ssh
folder, there should be these two files:id_rsa
andid_rsa.pub
. These are the files that tell your computer how to communicate with GitHub, BitBucket, or any other Git based service. Typels
to see a directory listing. If those two files don't show up, proceed to the next step. NOTE: Your SSH keys must be namedid_rsa
andid_rsa.pub
in order for Git, GitHub, and BitBucket to recognize them by default.ssh-keygen -t rsa -C "[email protected]"
. This will create bothid_rsa
andid_rsa.pub
files.id_rsa.pub
in your favorite text editor (you can do this via Windows Explorer or the OSX Finder if you like, typingopen .
will open the folder).id_rsa.pub
and paste it into GitHub and/or BitBucket under the Account Settings > SSH Keys.NOTE: I like to give the SSH key a descriptive name, usually with the name of the workstation I'm on along with the date.
git push
again and see if it works. It should!More help available from GitHub on creating SSH Keys and BitBucket Help.