Configure git extension and release code to csdn
[Git and git extension are installed by default in this article]
Today, we have spent a lot of time dealing with this issue, hoping to save you time.
In other words, the advantage of using SSH verification to push (upload) code to code.csdn.net is to avoid entering the password each time.
The procedure is as follows:
1. Use git Bush to create a public key.
But note that the default directory for running git Bush must be the directory of your git archive. How can this problem be solved?
1. Run CMD and call up the dark command line.
2. Run the command line command (various CD) to enter your git repository directory. Example:
My archive is in the JS Code folder of the E drive. When I open the CMD program, the default value is c: \ Users \ sunsoft.
To locate the directory, perform the following operations:
1. Enter "E:" And press Enter.
2. Enter "CD gitcode" and press Enter.
3. Enter "CD jscode" and press Enter.
For example
3. Locate the Directory and open git Bush:
Paste the following command to the command prompt:
"C: \ Program Files (x86) \ git \ bin \ sh.exe" -- login-I
Someone asked, where does this command come from? The installation path must be different?
(Ha, don't learn programming if software is installed on the d disk ............)
In the Start menu, right-click the GIT Bush icon and select "properties"
The following interface is displayed:
Copy and paste the content in the target.
4. At this time, you can see the GIT Bush Command Prompt:
Enter your registered csdn user name and email address in the following format:
Git config -- global user. Name "csdn ID"
Git config -- global user. Email "register email in csdn passport"
Then, enter the following content to create the public key and private key:
The format is as follows:
Ssh-keygen-T-RSA-c "[Your csdn registration email]"
At this time, two files are generated,
Copy the content in this id_rsa.pub file (open this file in Notepad) and go to the Code hosting page of csdn:
Click Add public key to paste the copied content:
[This is the public key. Do not make a mistake]
Click Save, for example:
So far, the configuration task has been completed. Next, we need to generate the private key supported by putty for the encrypted upload program.
2. Configure the SSH secure logon private key for Putty:
1. Open git Extension
2. Open "Generate and import key" as shown in"
In the displayed window, select "conversions -- import key", as shown below:
In the pop-up file selection dialog box, select a private key next to the generated public key, that is, the file without a suffix, as shown below:
Then, this interface appears. Select this file:
Save the name in English. (Click "Save Private Key ")
In this dialog box, click "Yes (y )"
Then select a path to save.
3. Use git extension to push code
1. Open git extension (in the directory of your archives, right-click a single machine and select "gitext browse ")
2. If the following figure appears, click the button framed in red.
3,
Click Manage remote. The following interface is displayed, which is filled in according to the instructions below.
Click Save. Click Close, and return to the preceding window, as shown in the following figure. Select the "Remote Archive" name just created:
Then, click "push ".
Success. If any steps are stuck, leave a message to ask!
[PS: Where can I find the archive address ?]
See: (the premise for reading this article is:
1. You have registered a csdn account and created a file library on code. csdn. net;
2. You have installed git and git extension.
3. You have the learning spirit and search for this article.
)
[PPS]
All rights reserved, free forwarding authorized, but must indicate the source (http://www.whutcom.com Wuhan University of Technology Computer Association )!
Reference link:
1. Code help document https://code.csdn.net/help/CSDN_Code/code_support/Index
2. [open source project] _ [Use code.csdn.net to manage open source project] http://www.tuicool.com/articles/ammM3i
3. csdn code git clone **. Git http://blog.csdn.net/frank0712105003/article/details/26949069