How to generate an SSH public key on GitHub and clone the project with NetBeans

Source: Internet
Author: User
Tags file copy netbeans

First, generate the SSH public key.

1. First determine if the machine has created a public key:
$ ls ~/.ssh

This 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 "邮箱" $ ssh-keygen -t rsa -C "邮箱" //多个密钥的情况下,可生成ssh key同时指定保存的文件名$ ssh-keygen -t rsa -f ~/.ssh/ellacf -C "邮箱"

After execution, the folder that holds the two keys is filled in, and passphrase, all of which you can press ENTER. Then execute LS to view the generated file.

    • Id_rsa and id_rsa.pub are private keys and public keys, respectively.
    • We specify the filename is Id_rsa.github, then the ~/.SSH directory will be more than Id_rsa.github and id_rsa.github.pub two files, Id_rsa.github saved is the key we want to use.
2. Add a public key to GitHub 2.1 First you need to copy the contents of the Id_rsa.pub file, you can use the editor to open the file copy, you can also use the git command to copy the contents of the file, such as:
$ pbcopy < ~/.ssh/ellacf.pub

Added to GitHub's SSH kesy settings.

1. 复制key到剪贴板2. 登录github3. 点击右上方的Accounting settings图标4. 选择 SSH key5. 点击 Add SSH key
3. Test if GitHub is connected successfully 3.1 next test:
$ssh -T git@github.com

If displayed:

to continue connecting (yes/no)?输入yes。

And then we can see

Hi yourusername! You‘ve successfully authenticated, but GitHub does notprovide shell access.

4. Using the NetBeans cloning project (for example, clone Apdplat)

1. Using NetBeans to check out code

Open NetBeans, Team development, Git-and clone ...-Resource library url:github.com:youraccount/ Apdplat.git (Youraccount To change the account you applied on GitHub, and fork this project before checking out). User name: Git---Select the private key file and enter the passphrase, master (this is the password)- > select the local save directory (the path where the selected directory cannot have spaces), check out after completion select: Open the desired item, open

2, right-click on Apdplat, choose Build, console output build information, download dependent jar file from the Internet, wait until prompt build success

3. If the user name and password of the MySQL database are not root, open apdplat_web, other sources, src/main/resources Db.local.properties, you can set the database type and user name and password in this file.

4. Click the Server, the NetBeans menu tool, Apache Tomcat, Platform, VM options, and so on, enter:-xx:-usesplitverifier-xms256m-xmx100 0m-xx:maxnewsize=256m-xx:maxpermsize=256m

5. Right-click on Apdplat_web, select Run-to-select Deployment Server, Apache Tomcat, console output build information, generate a running war package, launch Tomcat and pop-up Web landing interface, Access address:/HTTP Localhost:8080/apdplat_web

6. Util, Apdplat_web, source package, Authorizationutils.java file, set the value of code to the Web page activation interface prompt machine code, right-click to run the file, using the Output window to output the registration code, in the browser to activate the system (also in the http://localhost:8080/ apdplat_web/public/reg.jsp Calculating the activation code)

7. Add the registration code to the file apdplat_web/src/main/resources/licences/apdplat.licence, then clean and build it later without activating the system again

8, using the default user name admin and password Admin login system, if there is a click on the left side of IE, the function menu is not responding, click the Compatibility button on the right side of the browser address bar

How to generate the SSH public key on GitHub and clone the project with NetBeans

Contact Us

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.