I use public and private key to ssh to a remote server without password. After that, I need to perform "git pull" command. But I don't know how to pass the password into it. Trying the following solution, but it does not work:
#!/bin/sh ssh user@server ' cd /folder echo "password" | git pull '
Another thing is I don't want to expose the password in the script. Any suggestion? Thanks