I have a set of web servers, and to keep the file up to date on the server, I use a window scheduled task I am doing The task is called a batch file which executes the GIT-pull command.
It seems quite simple, but I use the SSH key to authenticate the git server. So far, the only way I am able to understand these keys in GIT is to pass this much more Works for Shash Part; However, one major issue is that the pagnet runs in the background, and on the first execution of this batch file, the first line hangs indefinitely to work around this, I manually run the task, kill it , Then let it run automatically later. However, if the pager crash or the server reboots, my files no longer synchronize on that server because the first-line problem (which could be a major problem in the round robin scenario). Are there any suggestions on how to improve this plan? I can not go to https-based git. I do not recognize the condition that you have to make special environment settings for working the guit command. Are you sure you have installed it correctly? is required. (SSH_AGENT_PID and SSH_AUTH_SOCK variables are set by framework) Pageant.exe As a result, my batch file contains the following commands:
"C: \ Program Files \ TortoiseGit \ bin \ pageant.exe" "C: \ PrivateKey.ppk "Set local set HOME = C: \ set GIT_SSH = C: \ Program Files \ TortoiseGit \ bin \ TortoisePLink.exe cd c: \ webserverfiles git pull -v --progress main master
ssh-keygen.exe-C " To generate a key in the firstname
$ HOME \ .ssh folder, .lastname@ domain.com "
.ssh \ id_rsa.pub Copy in
git clone ssh: // xxxx should work now.
No comments:
Post a Comment