Advertisement
Guest User

Untitled

a guest
Jul 24th, 2017
458
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.47 KB | None | 0 0
  1. [core]
  2. repositoryformatversion = 0
  3. filemode = true
  4. bare = false
  5. logallrefupdates = true
  6. [branch "master"]
  7. remote = origin
  8. merge = refs/heads/master
  9. [remote "origin"]
  10. url = git@1.2.3.4:/opt/git/repo.git
  11. fetch = +refs/heads/*:refs/remotes/origin/*
  12.  
  13. [ec2-user@ip-10-0-0-111 html]$ sudo git pull
  14. Permission denied (publickey).
  15. fatal: Could not read from remote repository.
  16.  
  17. Please make sure you have the correct access rights
  18. and the repository exists.
  19.  
  20. ssh git@1.2.3.4
  21.  
  22. debug1: Offering RSA public key: /home/ec2-user/.ssh/id_rsa
  23. debug1: Server accepts key: pkalg ssh-rsa blen 279
  24. debug1: Authentication succeeded (publickey).
  25.  
  26. Feb 22 15:45:44 hostname sshd[20142]: Connection from 4.5.6.7 port 50409
  27. Feb 22 15:45:44 hostname sshd[20142]: Found matching RSA key: <fingerprint>
  28. Feb 22 15:45:44 hostname sshd[20142]: Accepted publickey for git from 4.5.6.7 port 50409 ssh2
  29. Feb 22 15:45:44 hostname sshd[20142]: pam_unix(sshd:session): session opened for user git by (uid=0)
  30.  
  31. Feb 22 15:46:41 hostname sshd[20177]: Connection from 4.5.6.7 port 50410
  32.  
  33. git pull
  34.  
  35. sudo ssh git@1.2.3.4
  36.  
  37. $ whoami
  38. nodejh
  39.  
  40. # It will generate the ssh key for user: nodejh
  41. $ ssh-keygen -t rsa -C "jianghangscu@gmail.com
  42.  
  43. # Check that you are connecting to the correct server
  44. $ ssh -T git@github.com
  45. Hi username! You've successfully authenticated...
  46.  
  47. # change the current user to admin
  48. $ su admin
  49. # generate ssh key for `admin`
  50. $ ssh-keygen -t rsa -C "jianghangscu@gmail.com`
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement