I have a SSH key to allow me to push to a certain repository. This works - however, I don't want to leave the SSH key with ssh-agent (on other computers) and would rather have a portable script solution.

With HTTPS on GitHub, for example, I can generate a token online and then do:

git remote add origin "https://TOKEN@github.com/USER/REPO.git"

Is there something similar for SSH keys?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.