Push to GitHub without a password using ssh-key

前端 未结 6 1629
青春惊慌失措
青春惊慌失措 2020-12-12 08:59

I generated an SSH key pair without a password and added the public key to GitHub.

Connection with

user@dev:/var/www/project# ssh -T git@github.com
H         


        
6条回答
  •  无人及你
    2020-12-12 09:26

    Using the command line:

    Enter ls -al ~/.ssh to see if existing SSH keys are present.

    In the terminal is shows: No directory exist

    Then generate a new SSH key

    Step 1.

    ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
    

    step 2.

    Enter a file in which to save the key (/Users/you/.ssh/id_rsa): 
    

    step 3.

    Enter passphrase (empty for no passphrase): [Type a password]
    
    Enter same passphrase again: [Type password again]
    

提交回复
热议问题