One, ubuntu install git software
1. Install Git and SSH
[Email protected]:~$ sudo apt install git[email protected]:~$ sudo apt install ssh
2. Configure GIT user information
[email protected]:~$ git config--global user.name "Wangpengtai" [email protected]:~$ git config--global user.email] [emai L protected] "
Attention:
[Email protected]:~/devops$ git commit-m "Add centos6_security.sh" * * * * * * * me who is. Run git config--global user.email "[email protected]" git config--global user.name "Your name" to set Your account ' s de Fault identity. Omit--global to set the identity of the repository.fatal:unable to Auto-detect email address (got ' [email protecte D] (none) ')
Do not configure this will prompt! Tell you how to use it.
Second, Ubunu local create SSH key
[Email protected]:~$ ls-al
See if there is no. ssh file, Ubuntu new system does not have SSH, so no, manually create one or SSH connection to a server, set up a link on the line.
[Email protected]:~$ ssh-keygen-t rsa-c "[Email protected]"
Go straight on, find the id_rsa.pub in the. SSH folder and copy the contents.
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M00/06/38/wKiom1m0BHCiskkZAALbpKZT37g330.jpg "title=" 1504969416904.jpg "alt=" wkiom1m0bhciskkzaalbpkzt37g330.jpg "/> third, add SSH key key on GitHub
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M00/A4/E9/wKioL1m0BXOgyc8uAAXDb-3rrQM616.png "title=" 1.png "alt=" Wkiol1m0bxogyc8uaaxdb-3rrqm616.png "/>
650) this.width=650; "src=" Https://s3.51cto.com/wyfs02/M02/06/38/wKiom1m0BaujZFkJAANXmMfFSJY893.png "title=" 2.png "alt=" Wkiom1m0baujzfkjaanxmmffsjy893.png "/>
Iv. Couclon on GitHub to local
1. Download Remote Warehouse
Warehouse can create a new one, now there are ready to do.
[Email protected]:~$ git clone [email protected]:wangpengtai/devops.git
The first time you establish a connection, you need to confirm information from GitHub connections.
2. Push local code to GitHub
[Email protected]:~/devops$ git add centos6_security.sh [email protected]:~/devops$ git commit-m ' Add centos6_security.s H "[Email protected]:~/devops$ git commit-m" add centos6_security.sh "[email protected]:~/devops$ git push Origin master
650) this.width=650; "src=" Https://s2.51cto.com/wyfs02/M01/06/38/wKiom1m0CYqgB7WvAALr3E9UwM8815.png "title=" WX20170909-232951@2x.png "alt=" Wkiom1m0cyqgb7wvaalr3e9uwm8815.png "/>
This article is from the "LINUX" blog, so be sure to keep this source http://wangpengtai.blog.51cto.com/3882831/1964031
Ubuntu Connect remote GitHub