When executing the following command, I am prompted to type the password:
$ git pull
Enter passphrase for key (...)
When I try to show the same information programatically using Apache Commons Exec, the program gets stuck and doesn't print anything:
CommandLine cmd = new CommandLine( "git" );
cmd.addArgument( "pull" );
DefaultExecutor executor = new DefaultExecutor();
executor.setStreamHandler( new PumpStreamHandler( System.out, System.err, System.in ) );
executor.execute( cmd );
Why does the example get stuck without printing anything, and while using the native console it prompts me to provide the git password?