Git – Push with custom ssh key occasionally
We have a deployed site where we use deploy key (read-only) to pull changes. But in maintenance mode the site modify itself, so we want to push back those changes. Is there any way to push back changes through ssh without storing the key itself on the server? I am looking for something like
git push -ssh-key="ssh-rsa ..."
I would like to solve the issue with default commands if its possible.
- GIT and SSH, which key is used?
- Permission denied (publickey) errors on Windows when using Moovweb
- Can I link git submodules with some kind of fallback URL? If SSH clone fails, git should be able to clone using https
- permission denied (public key) error for ssh -vT firstname.lastname@example.org
- cron git push with ssh key
- Cloning git repository from Windows with CopSSH and MSysGit
One Solution collect form web for “Git – Push with custom ssh key occasionally”
IF you are using ssh keys you mush “exchange” keys and the server has to validate it using your key.
What you can do instead is to set a trusted certificate on the server (signed certificate ) and then use it instead of the ssh key.
A very detailed answer how to it can be found here.
configure Git to accept a particular self-signed server certificate for a particular https remote