Registered Account https://github.com
Configuring the SSH key key locally
After the configuration, we need it here.
To start configuring SSH key locally, first check to see if the local computer has been configured for SSH, enter the terminal and typed $ defaults write Com.apple.finder Appleshowallfiles-bool true ( Show hidden files (you need to rerun the Finder) because. SSH is a hidden file).
In the desktop menu, check to see if there is this file. ssh hidden files, some words personal suggestions to delete.
Now start configuring SSH key locally
mkdir. SSH terminal to create a new. ssh file
cd. SSH into the new. ssh file directory that you just created
- Ssh-keygen-t rsa-c "[email protected]" after "" casually enter a mailbox on the line, enter will prompt you to enter a password or something, you can ignore the return to go down.
Ls-la See if there is a id_rsa (private key) id_rsa.pub (public key) of these two things, if there is a success.
- Pbcopy < ~/.ssh/id_rsa.pub copy public key
- Log in to your account to go to GitHub and select settings
Key to paste the value you just assigned
Title casually fill in
The last GitHub SSH key is configured.
- Next in terminal enter $ SSH-T [email protected]
When you see this, the connection is successful, and the point to the left of the secret key added to GitHub is initially grayed out, and when the terminal executes the command, refreshing the page will see the gray point turn green.
Project creation
1 Open the terminal, first test your account with GitHub not connected: ssh-t [email protected]
2 Creating a personal project in Git
Uploading a local project
Start at the terminal by entering your own build project root directory.
Typing the following command:
Touch README.MD//Create a new document for record submission operations
GIT init//Initialize local repository
git add readme.md//Add
git add *//Join All projects
git status//check status if all green proves successful
Git commit-m "First commit"//submit to the repository and write some notes
git remote add origin [email protected]:xxx/yyyy.git//xxx is your github account, such as my account name: li4236 = = = yyyy The name of the project you just created
Git push-u origin master//submit something from the local repository to address is Origin's address, under Master Branch
So far the local project has been submitted to GitHub, so refresh the page and see.
I have some problems in the configuration process
- Permission denied (PublicKey) solution:
First, clear all the Key-pair
Ssh-add-d
Rm-r ~/.ssh
Delete your public-key on GitHub
Start configuring SSH key again
- He authenticity of host ' github.com (192.30.252.120) ' can ' t be established.
RSA key fingerprint is sha256:nthbg6kxupjwgl7e1igocspromtxdcarlvikw6e5sy8.
Is you sure want to continue connecting (yes/no)?
I have been built by the return, in fact, to enter: Yes (silly x me)
MAC Android Studio Submit local project to GitHub already configured SSH KEY