Assume that you need to establish SSH key for two hosts to crawl, update code, host a:111.111.111.111, host b:222.222.222.222. First, use two accounts ([email protected] and [email protected]) to generate two ssh, respectively, to a different location, for example: # Host A's presence/c/user/. ssh/id_rsassh-keygen -t rsa–c "[email protected]" # Host B exists /c/u
name implies, you can save the relevant configuration, and then just use it. Host github2HostName github.comUser Xiaodan ' SfatherIdentityfile ~/.ssh/my2In this step, it is generally possible to generate multiple public-private key configuration, you can test the connection according to different protocols such as Git,ssh [email protected] can But in the use of
Transferred from: http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html
This experience is divided into two parts:
The first section describes: under Windows, configure SSH keys to connect to GitHub via Msysgit (git for Windows, git Bash).The second section describes: Create a warehouse on GitHub
identity.
What should I do ?... The new project cannot be pushed to the new github account. The new account jiangxin on Github is used to create a new empty version library freemind-mmx. In the local freemind-mmx project, configure github as a new source. The PUSH fails:
$ git remote add github git@github.com:jiangxin
1. Create a new directory and use git tools to open git Bash here2. Execute the following command ssh-keygen-t rsa-c "[email protected]" where the mailbox is GitHub's mailbox3. Re-execute the eval "ssh-agent-s" command4. Input ssh-add ~/.ssh/id_rsa command when error5. In the above situation, after entering
The recent configuration of the GitHub SSH key, the search for a large amount of data found GitHub official has a related tutorial ... Translate the official tutorials here to deepen your impressionsOriginal link: https://help.github.com/categories/ssh/Generating an SSH key
:+---[RSA 2048]----+| .. oo=. || . .. =*o || boo*o.o || B o*. O. || * B. s+ || +.O.O.O E || . OO.O * || .. Oo. + || O ... |+----[SHA256]-----+glamordemac-mini:~ glamor$3. Locate the public key that was just generated by/users/glamor/.ssh/id_rsa.pub. Path. If some hidden files are not displayed by default, use defaults write Com.apple.finder appleshowallfiles-bool truecommand, if not effective in real time, it is recommended to click on the small
| | o....| | . ooo | | o=. oo|+-----------------+for no passphrase): Here you can enter a password to verify at loginAdd SSH key to GitHubUsing the text Editing tool to open the Id_rsa.pub file, if you do not see this file, you need to set the display hidden file. Accurately copy the contents of this file to ensure the success of the setup.Click the Settings button on the GitHub home p
the file location and password, if you are comfortable enough, in fact, you can directly enter, do not need any password. When you are done, you can see the files you just generated under the/c/users/you/.ssh/path: Id_rsa and Id_rsa.pub. That is, the public and private keys.
Add a public key to your GitHub account
Log in to your
Id_rsa.pub file is uploaded to the local open or directly to cat id_rsa.pub 650) this.width=650; "title=" image "style=" border-left-0px; border-right-width:0px; border-bottom-width:0px; border-top-width:0px "border=" 0 "alt=" image "src=" http://s3.51cto.com/wyfs02/M02/8E/59/wKiom1i-Q_ Gszrndaac2d5rtmke696.png "width=" 652 "height=" "/>" Copy the contents of the key Login to GitHub now (no account?) Of course, you have to register a first) Ente
Generate a new SSH key
Open git bash
Input" [email protected] "
Enter a file name, default is Id_rsa, this step can be directly selected by default. (multiple users may want to set another name to prevent conflicts)
Enter the password, as above can be selected by default.
Add the newly generated SSH key to the
When you add SSH key to your GitHub account in a Windows environment, you need to execute the following command in Git Bash :First step: Check the existing SSH keys$ ls-al ~/.sshStep two: Generate a new SSH key$ ssh-keygen-t rsa-c
Generating SSH Keys
Mac
Windows
Linux
All
SSH Keys is a-identify trusted computers, without involving passwords. The steps below would walk you through generating a SSH key and adding the public key to your Git
+/il8b++1nkatmikjn2so1d01qratlmqvssbx Nrrfi9wrf+m7q== [emailprotected]local 2. Log in to your GitHub account. Then on the left column of account Settings, click SSH keys, click Add SSH key3. Then you copy the above public key content and paste it into the "key" text field. Title field, you can just fill
First, generate the SSH public key.1. First determine if the machine has created a public key:$ ls ~/.sshThis command is used to check if a id_rsa.pub or id_dsa.pub file already exists, and if the file already exists, the following steps can be omitted and go directly to step 2.If there are no files like Id_rsa and id_rsa.pub, it is not created. Method of Generation://配置git用户名和邮箱:$ git config user.name "用户名"$ git config user.email "邮箱" $
When you add SSH keys in the background of GitHub, if you have some problems with local git clone git://www.somesite.com/test.git, instead of access denied, you need to test this locally:
Ssh-t git@github.com
If the return is:
Permission denied (PublicKey).
Then you might want to
Create an SSH Key to connect to GitHub or GitLab
When we clone a project from GitHub or GitLab or participate in a project, we need to prove our identity. One possible solution is to add the account name and password to each access, and save a unique key locally, you can also save this key in your account and include it when you access it.
This error occurs because when you add a new key on GitHub, the ~/.ssh/id_rsa.pub content is copied incorrectly. Generally occurs under Linux, because Windows uses notepa++ to open this file and copy is generally not a problem, and Linux under the use of Vim to open and copy will be added to vim because of the addition of the key to add failure. The workaround is to use the cat command to output the.
protected] The key's randomart image is: + -- [RSA 2048] ---- + | * o. | o | ** O. |. + *. +. |. o s. + | .. | .. | .... |. E .. | + --------------- +
At this time, there are two files under the. Ssh directory
id_rsa id_rsa.pub
Id_rsa is the private key id_rsa.pub is the public key.
Then, execute the following command to add the generated key
ssh-add id_rsa
Copy the content in id_rsa.pub, find add
= Server IP Address
5. RunningStart the gitblit.cmd in the Gitblit directory to run, using Installservice.cmd to start the gitblit as a Windows service;If the operation error, it is recommended to use the directory Gitblit-stop.cmd stop and then restart;After startup in the browser Input server IP and HTTP port accessible, Default user name admin, password admin:
Create a repository here:
Once created, you can see that
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.