I want to do this command in one line:
git pull && [my passphrase]
How to do it?
This is not exactly what you asked for, but for http(s):
https://user:pass@domain/repo
but that's not really recommended as it would show your user/pass in a lot of places...Usage examples for credential helper
git config credential.helper store
- stores the credentials indefinitely.git config credential.helper 'cache --timeout=3600'
- stores for 60 minutesFor ssh-based access, you'd use ssh agent that will provide the ssh key when needed. This would require generating keys on your computer, storing the public key on the remote server and adding the private key to relevant keystore.
Can you elaborate on the SSH part? I'm configuring an EC2 instance, and I would like it to pull without requesting my password and the AWS autoscale. This public/private scheme looks like a good solution.
@PedroDusso sounds like this thread is what you're after
i ended using the deploy keys mechanism, which appears to be a good solution. Thanks!
I posted an answer below, but I ended up using access tokens as none of these methods seemed ideal for my use case.