I try to use apache commons-exec to run git clone command but stuck, it did not prompt me with password input at all and block there.
DefaultExecutor executor = new DefaultExecutor();
executor.setStreamHandler( new PumpStreamHandler( System.out, System.err, System.in ) );
executor.execute( "git clone --progress -v https://xxx/prj.git" );
Any ideas to solve this?
I figure out a way to work around this problem, just wrap the user name and passwd as inputstream:
String input="...";
executor.setStreamHandler( new PumpStreamHandler( System.out, System.err, new ByteArrayInputStream(
input.getBytes() ) ) );