The recent project moved to the company's "GitHub" above the original SVN ant release script to change, so Baidu ant get git way too little, Windows platform is not so engaged for two days, today finally a bit of results to share to everyone.
1. Also install git on the server, configure the GIT environment, add C:\Program Files (x86) \git\cmd in path (your path may be different, is the git\cmd path)
2.GitHub There are two paths to the HTTP of the user password, I did not study the bat script automatically enter the password, so the path to start with Git
3. Put the public key. SSH folder into C:\Users\Administrator (login user folder) below
3.5 The existing public key does not have a private key,
1) Run Puttygen (install tortoisegit in its directory bin), click Import Key in the Conversions menu, select the location of the private key file Ssh-keygen generated, such as the Id_rsa file.
2) Click the Save Private Key button to save it as a. ppk file.
3) Open Pageant, click Add Key and select the location of the. ppk file that you saved in the previous step.
4. Double-click Start Pageant.exe (Install tortoisegit in its directory bin), click Add Key, select PPK file to open. The pageant will run in the background, with the corresponding icon in the lower right corner.
First download with Git bash there is a yes to manually enter it later, so you can use the script it's an idea.
5.ant syntax add ant macro First, put it on the script header
<Macrodefname= "Git"> <attributename= "command" /> <attributename= "dir"default= "" /> <elementname= "args"Optional= "true" /> <Sequential> <Echomessage= "Git @{command}" /> <execexecutable= "Git"dir= "@{dir}"> <Argvalue= "@{command}" /> <args/> </exec> </Sequential></Macrodef><Macrodefname= "Git-clone-pull"> <attributename= "Repository" /> <attributename= "Dest" /> <Sequential> <gitCommand= "Clone"> <args> <Argvalue= "@{repository}" /> <Argvalue= "@{dest}" /> </args> </git> <gitCommand= "Pull"dir= "@{dest}" /> </Sequential></Macrodef>
Re-write Get key sentence
<repository= "Git://github.com/280north/ojunit.git"dest= "Ojunit"/>
Here the following dest= "Ojunit" for the project file name is the same as the path at the end, get back and the ant script in a folder
6.git clone is the full pull release path to the actual path, which is also a bad place for git (maybe I am small white), and the old driver estimates that the ant is actually going to take the cmd to get git this way, There might be a third-party jar. I didn't find any hope on GitHub. Find a message add
Thank the following two bloggers for my reference: http://justlpf.blog.51cto.com/3889157/1212564
https://yq.aliyun.com/articles/44476
Windows+ant+git+tomcat Ant direct get git project deployment note point