I just got started with github and encountered a code upload problem.
Not much nonsense
1. register an account on the website and create a project test to enter the project. There is a project warehouse address in the lower right corner. Https://github.com/braverior/test.git
2. Install github in Linux
Sudo apt-get install git-core git-doc
3. Create an rsa public key
Ssh-keygen-t rsa-C "your_email@youremail.com"
A password is required throughout the process.
Then enter ~ /. Find the Public Key id_rsa.pub In the ssh directory.
Copy text in Notepad
Go to the settings in github.com, find the pubkey option, and enter the public key.
Arbitrary proposition Filling
4. Set Account Information
Git config -- global user. name "lukeyan"
Git config -- global user. email xxx@gmail.com
5. Test link:
If you have 've successfully authenticated, but GitHub does not provide shell access. This indicates that the link has been established.
Next upload:
Git init
Git add. # If it is., it indicates uploading files in all directories. It can be a file.
Git commit-m'version 1.0'
Git remote add origin https://github.com/user name /test.git
Git push origin master-f