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