简体   繁体   中英

Automated GIT clone

I would like to create either a script that can be executed or an application that will clone several GIT repositories for offsite data backup purposes. I need this to be able to run on a Windows 7 machine (I'm sure this will add to the complexity of this problem).

I tried using GIT bash (MINGW shell) and using C# to create the shell and invoke commands to it. My tester was working fine until it attempted to supply the password. It appeared that the password prompt was coming from yet another terminal instance as stdin and stdout were not longer to read and write to the console. Ideally I would like maintain a simple bash script that could be launched and clone the repositories but I was not able to find anything like that for Windows.

Any help or insight would be greatly appreciated.

The ssh keys should be created with no password. Ensure authorized keys file is updated on the machines you're connecting to.

Install msysgit and add the proper keys. I'm doing this without any issues. Make sure to set msysgit to not alter the line endings during it's install. You can change that later with git config if you forget. Use ssh and not putty.

Msysgit will give you bash on windows.

Hope this helps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM