git
Basically, it is an indispensable tool for a developer, not the server where git
it is not able to justify. Moreover, there is no git
, then oriented programming github where to start, as a programmer broken right-hand man.
You will be able to operate after the completion of the process are familiar, only takes a minute
- Original Address: server and git ssh key configuration
- Series: server operation and maintenance notes
installation
$ yum install git
If you use yum
to install git
, then it is not necessary to open an article in a single. That use yum
where the shortcomings in? We know that, yum
in order to ensure the stability of its warehouses, often the software version will be very old.
And with the yum
installation of git
no syntax highlighting!
Use ansible installation
If you do not know enough about ansible, you can refer to my article ansible Getting Started
Choose a nice Ansible Role
on it, we choose geerlingguy.git . Specified variable, from the source installation, and install the latest version.
hosts: dev
roles:
- role: geerlingguy.git
vars:
# 从源码安装
git_install_from_source: true
# 安装最新版本
git_install_from_source_force_update: true
Use ansible-playbook
the server installation batch
$ ansible-playbook -i hosts git.yaml
Successful installation
git version
Check the version number, in this case, 2.16.2
$ git version
git version 2.16.2
It then git status
view the next syntax highlighting effect
Configuration
Global mail and user name, then you can happily use the server git
management code
$ git config --global user.name shfshanyue
$ git config --global user.email [email protected]
Oriented Programming github
But for now you can github
program it? Do not!
Use ssh -T
connectivity test
$ ssh -T [email protected]
Permission denied (publickey).
At this point needs to be configured ssh key
to ensure proper github-oriented programming, you can view the next article ssh key configuration and github