Advertisement
RobertBerger

gitpod crude

Mar 8th, 2017
247
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.82 KB | None | 0 0
  1. attempt to automate things for gitpod clients
  2.  
  3. on gitpod client
  4. for every user you want to give access (e.g. student)
  5. create public/private keys
  6. ssh-keygen -t rsa
  7. you could automate it a bit like this:
  8. ssh-keygen -t rsa -N "" -C "${USER}@${HOSTNAME}" -f ~/.ssh/id_rsa
  9. allow access to gitpod server 1
  10. ssh-keyscan -H gitpod >> ~/.ssh/known_hosts
  11. ssh-copy-id gitpod@gitpod
  12. What about the password?
  13. ssh gitpod@gitpod
  14. sudo -i -u root sh -c 'cat /home/gitpod/.ssh/authorized_keys >> /home/gp/.ssh/authorized_keys'
  15. sudo -i -u root sh -c 'ls -la /home/gp/.ssh/authorized_keys'
  16. make sure that /home/gp/.ssh/authorized_keys has the right permissions:
  17. -rw-rw-r-- 1 gp gp 821 May 27 17:06 /home/gp/.ssh/authorized_keys
  18. on gitpod client
  19. now you should be able to clone without a password e.g. as student
  20. git clone gp@gitpod:u-boot.git
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement