1. Configure the global username and mailbox
- git config –global user.name “shanyouyan”
- git config –global user.email “[email protected]”
2. Configure the key
- ssh-keygen -t rsa -C “[email protected]”
- cat ~/.ssh/id_rsa.pub
Configure the obtained key into the SSH Keys of the remote repository
3. Build a warehouse
1. Initialize the warehouse
1.git init
2. Put it in temporary storage area and submit it locally
1. Git add. 2. Git add
Warning: LF will be replaced by CRLF in ‘XXX’ for Windows and Linux subscripts. This is because the newline character in Windows and Linux subscripts is not the same.
git config --global core.autocwenrlf false
3.
Git commit -m git commit -m
git remote add origin [email protected]:shanyouyan/shopMall.git
4.
git push (-u) origin master
If an Authentication error occurs, fatal: Authentication failed for 'http://xxx/' use the command: git push --set-upstream origin master
5. Git configuration remember username and password:
git config --global credential.helper store