How Git uses the Generate SSH personal public key to access the Git repository method ( here, for example, the coding platform ):1. Get the SSH protocol addressIn the Project code page click S
Generating public/private RSA key pair. enter file in which to save the key (/HOME/SCHACON/.SSH/ID_RSA): created directory '/home/schacon/.ssh '. enter passphrase (empty for no passphrase): enter same passphrase again: your identification has been saved In/home/schacon/.ssh
Generate SSH Public keyMost Git servers will choose to use the SSH public key for authorization. Each user in the system must provide a public key for authorization, and none will generate
1 if SSH is not installed, then use the following commandsudo apt-get install ssh2 checking the SSH public keyCD ~/.sshSee if it exists. SSH, if present, skim the next step; no, see the next step.3 generating the SSH public key$ ssh
From the gitlab using SSH to pull git code error: The remote end hung up unexpected, after the investigation, is the public key generation may have problems, regenerate, and then add SSH key on the Gitlab, pull the replacement code again.
About git ssh-key: solves the problem of multiple local ssh-keys, gitssh-keyWhen setting github, the official instructions require that the current id_rsa be backed up and a new private key be generated for github login. If this is done, the new private
Objective
If you set a password before you created SSH, it's very likely that the git operation has a forgotten password. How to solve this situation. Workaround
In this case do not think about how to re-modify the password, choose to re-create an SSH key, (PS: According to the investigation is
Recently, a project needs to use a server as a dedicated deployment server, encountered some problems in the implementation process, as follows:1. The SSH default port of the server and the SSH port of the project Git repository are inconsistent 2. Deployment requires SSH key
Set SSH Key for Git and sshkey for git
Set SSH Key1. check whether there is an SSH Key.$ Cd ~ /. SshIf this directory is not available, go to step 3.2. Backup3.
First, installation environment1. Native system: Windows ten Pro (64-bit)2. Git version: Git-2.11.0-64-bit.exe (64-bit)Second, git installationGo to the official website after downloading the next step to complete the installation, such as:See if the configuration is in the system environment variable after installationThen right-click on the desktop, choose
logon. You can specify other files;First, we generate different keys:
ssh-keygen -t rsa -C "user1" -f user1ssh-keygen -t rsa -C "user2" -f user2
We generate two different ssh keys, user1 and user2. Then we create the config file under. ssh,Input:
Host company HostName comp
The role of SSH keyWhen we use SSH to log in to the server, it is common to log in using the username/password method.You can also use SSH key to implement password-free login, which is generally used in this way by the GIT server more.Generate
1. In the past, everyone seems to be using HTTPS to synchronize the code with GIT, but after the new company, the director said to be equipped with SSH key, so probably understandAn SSH key allows establish a secure connection between your computer and GitLab (or GitHub).
Project development under Windows, using Git to connect to git libraries via ssh, while SSH uses public key to connect.
First you need to download the mygit and use Git bash after installation.
Git SSH Key settings and gitsshkey settingsI wanted to write an article about SSH, mainly about Git SSH. However, I found that many articles have been well written. You can refer to the "references" below ".Here is a simple record
It is a distributed code management tool. Remote code management is based on SSH, so SSH configuration is required to use remote git.
The SSH configuration for GitHub is as follows:
I,
Set git user name and email:
$ git config --g
Set the HOME environment variable to modify the ssh-key Path found by git by default, gitssh-key
Edit the profile file in the etc directory under the git installation directory. For example:E: \ Git \ etc \ profileFind the follow
ArticleDirectory
Linux Configuration
Windows Configuration
Recently, git is used, and it is inconvenient to enter the password each time. You want to use the SSH key (a mechanism similar to the-I parameter in the SSH command ). Now the problem has been solved. Here we will summarize the problem (from
then the new Git account is configured, follow these steps.1 CD ~/.ssh2 Generate keySsh-keygen-t rsa-c ' [email protected] 'Generating public/private RSA key pair.Enter file in which to save the key (/ROOT/.SSH/ID_RSA): Linger_gitEnter passphrase (empty for no passphrase):
Windows git multi-account configuration, multiple Ssh-key management on the same computerThis article is an extension of the previous article, "git-tortoisegit complete configuration Process" , so you need to know about the previous article, of course, you can directly look down, and some of the basic operations mentio
The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion;
products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the
content of the page makes you feel confusing, please write us an email, we will handle the problem
within 5 days after receiving your email.
If you find any instances of plagiarism from the community, please send an email to:
info-contact@alibabacloud.com
and provide relevant evidence. A staff member will contact you within 5 working days.