Ctrl + Alt + T opens command prompt, type white git and check that GIT is installed. If the current environment is set to environment, the GIT location setting is provided, usually in /usr/bin/Git Directory.
For example, if you entered Ubuntu16.04, you might get this command:
And Ubuntu18.04 has:
This might represent the default GIT in Ubuntu18.04, right?
First, update the list of APT packages with the following command:
sudo apt-get update sudo apt-get upgrade
Install GIT via the following command line:
sudo apt-get install git
Type Y Enter the mean.
Use the following command to view the installed version:
Use the following command to specify the installation path:
This iterates the initiative that Git will check that Ubuntu18.04 is not already pre-installed.
Currently, GIT has been installed successfully and can be used to clone some open libraries, but in real use we will always be in scenarios that need account information such as private, incompatible, or internal company open libraries. library, so keep tweaking it!
The username and password, as well as the long password for storing the user’s remote store, are added to GIT with the following command:
git config – global user.name “xxx”
git config –global user.email “[email protected]”
git config –global dependency. helpstore
The configuration was changed using the following command to check if the configuration was changed successfully:
git config -list
Although I was way off here, if you’re using it alone, you’ll see exactly the same settings for yourself.
Generate an SSH-RSA key (public key and private key) via the following command line:
ssh-keygen -t rsa -C “[email protected]”
In fact, I still like to go back to the car the most, that is, not to enter the password, and to go back to the car all the time.
Then two files will appear in the **~/.ssh/** directory:
ID_RSA private key file
ID_RSA.PUB Public key file
Log into Gitlab or GitHub and other repositories to add your SSH public key files.
Add the public key to the SSH and GPG keys. The specific method is to copy the contents of ID_RSA.PUB.
Use the following command to openid_rsa. pubfile, copy the key.
The editors opened here use GEDIT, or others like VIM, but I’m vulgar, GEDIT is more suitable for me.
There are some articles linking test and gitlab:
ssh -T [email protected]
Normally, this will not be very smooth and there is a high probability that the following situation will occur:
I may have read some articles, but I haven’t solved them, and I haven’t studied much. It was not a good idea to get a long arrow above an arrow with a long plan.
Today’s GIT setting is temporarily here, and then I have time to talk about it.