I want to give a user access to a git repository without him having to enter a password.
Lets say I have a bash script that does this:
eval `ssh-agent -s`
ssh-add ~/.ssh/id_rsa
This script is being run with sudo ./script.sh I would I add the ssh key for a user instead of root?
您可以将su -c <command> $SUID_USER
与命令一起使用。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.