Some users prefer to use the command line, but on the Linux system of the command line, users can only use the HTTP protocol for secure access. So in this case, how do we set up the GIT development environment? Let's take a look at the method together.
Solution:
1. Create a user name /password file (plain text password)
In his own $ HOME directory, edit .netrc file contents As follows:
machine git.xxxxx.net
login [email protected] password xxxxxx
2. Create a GnuPG key
in your own $ In the HOME directory, execute the command:
gpg --gen-key
Note: The default carriage return is OK, the RSA key is 1024, 2048 is too slow, but the security is good
You can view the generated keys using the following command:
gpg --list-key
3. Encrypt the username/password file
in your own $ In the HOME directory, execute the command:
gpg -o ~/.netrc.gpg -er yourname ~/.netrc
Note: After the execution is complete, you can delete the plaintext password file .netrc
4. Set the user's Git configuration
In your own $HOME directory, execute the command:
#This method will cache the username/password, you don't need to enter it every time.
git Config --global credential.helper 'store'
#This method requires entering a username/password each time
#git config --global credential.helper 'netrc -f ~/. Netrc.gpg -d'
At this point you can edit the .gitconfig file and fill in more information:
[user]
name = XXX
email = [email protected]
[core]
excludesfile = /home/xxx/.gitignoreglobal
[credential]
helper = store
#helper = netrc -f ~/.netrc.gpg -d
5. Start the GIT environment
1
git clone http://git. Xxxxx.net:port/project/my_project.git
Note: You need to use the new version of Git (I am using 2.2.2) and copy the git-credential-netrc script to the Git installation directory (libexec/Git-core)
The above is the way to set up the GIT development environment in the Linux system of the command line. If you need or are interested, you can try it on your own computer.
The access control list (ACL) under Linux is mainly used to control the permissions
I chatted with friends before, knowing that I can use PXE to install virtual machin
Many friends have experienced serious fever problems after installing Ubuntu 12.04
Many users have encountered garbled problems when installing GBK or GB2312 on Linux system. This is
Linux how to use the cal command to view the calendar
How to create a video DVD in a Linux desktop environment
How to install OpenOffice on Linux system
How to install and use Makeself
Linux restart oracle database three major techniques
How to initialize the CentOS server
Linux uses S3QL to create an encrypted file system
Introduction to the syntax and parameters of the Linux system xlsclients command
How Linux can improve the copying efficiency of large files
Win10 10061 black screen blue screen emergency patch KB3055415 how to install?
The five most difficult words are
Home Edition Win XP system installation IIS configuration skills
How to face the retirement of WindowsXP
How to close the reminder event in the Win10 system calendar?
Win7 desktop shortcut can not open how to do
Micro letter how to shoot and send video
Win8.1 wireless network limited reasons and solutions Daquan