MAC Android Studio Submit local project to GitHub already configured SSH KEY

Source: Internet
Author: User
Tags github ssh key

    1. Registered Account https://github.com

    2. Configuring the SSH key key locally
      After the configuration, we need it here.

      1. To start configuring SSH key locally, first check to see if the local computer has been configured for SSH, enter the terminal and typed $ defaults write Com.apple.finder Appleshowallfiles-bool true ( Show hidden files (you need to rerun the Finder) because. SSH is a hidden file).

      2. In the desktop menu, check to see if there is this file. ssh hidden files, some words personal suggestions to delete.

      3. Now start configuring SSH key locally

      4. mkdir. SSH terminal to create a new. ssh file

    3. cd. SSH into the new. ssh file directory that you just created

      1. Ssh-keygen-t rsa-c "[email protected]" after "" casually enter a mailbox on the line, enter will prompt you to enter a password or something, you can ignore the return to go down.
    4. Ls-la See if there is a id_rsa (private key) id_rsa.pub (public key) of these two things, if there is a success.

      1. Pbcopy < ~/.ssh/id_rsa.pub copy public key
      2. Log in to your account to go to GitHub and select settings
        Key to paste the value you just assigned
        Title casually fill in
        The last GitHub SSH key is configured.
      3. Next in terminal enter $ SSH-T [email protected]
        When you see this, the connection is successful, and the point to the left of the secret key added to GitHub is initially grayed out, and when the terminal executes the command, refreshing the page will see the gray point turn green.

Project creation

1 Open the terminal, first test your account with GitHub not connected: ssh-t [email protected]

2 Creating a personal project in Git

Uploading a local project
Start at the terminal by entering your own build project root directory.

Typing the following command:
Touch README.MD//Create a new document for record submission operations
GIT init//Initialize local repository
git add readme.md//Add
git add *//Join All projects
git status//check status if all green proves successful
Git commit-m "First commit"//submit to the repository and write some notes
git remote add origin [email protected]:xxx/yyyy.git//xxx is your github account, such as my account name: li4236 = = = yyyy The name of the project you just created
Git push-u origin master//submit something from the local repository to address is Origin's address, under Master Branch

So far the local project has been submitted to GitHub, so refresh the page and see.

I have some problems in the configuration process

    1. Permission denied (PublicKey) solution:
      First, clear all the Key-pair
      Ssh-add-d
      Rm-r ~/.ssh
      Delete your public-key on GitHub

Start configuring SSH key again

    1. He authenticity of host ' github.com (192.30.252.120) ' can ' t be established.
      RSA key fingerprint is sha256:nthbg6kxupjwgl7e1igocspromtxdcarlvikw6e5sy8.
      Is you sure want to continue connecting (yes/no)?
      I have been built by the return, in fact, to enter: Yes (silly x me)

MAC Android Studio Submit local project to GitHub already configured SSH KEY

Related Article

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.