Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/324.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
通过java中的process builder克隆Git_Java_Git_Command Prompt_Processbuilder - Fatal编程技术网

通过java中的process builder克隆Git

通过java中的process builder克隆Git,java,git,command-prompt,processbuilder,Java,Git,Command Prompt,Processbuilder,我想通过java中的process builder运行以下命令: Git clone --depth 1 <url> 代码退出。 注意:在url本身中提供用户名和密码是不可取的。另外,使用窗口凭据msnager popup是不可取的,它已被设置为false。您可能会发现使用一个可用的java git库更容易。还不清楚构造经过身份验证的url的“不可取之处”是什么,您不必将身份验证信息硬编码到程序中。@pvg我之前使用jgit库来执行所有这些功能,但jgit中没有浅层克隆,因此我必须

我想通过java中的process builder运行以下命令:

Git clone --depth 1 <url>
代码退出。
注意:在url本身中提供用户名和密码是不可取的。另外,使用窗口凭据msnager popup是不可取的,它已被设置为false。

您可能会发现使用一个可用的java git库更容易。还不清楚构造经过身份验证的url的“不可取之处”是什么,您不必将身份验证信息硬编码到程序中。@pvg我之前使用jgit库来执行所有这些功能,但jgit中没有浅层克隆,因此我必须通过process builder运行这些命令。此外,如果我在url中提供用户名和密码,它会将这2个存储在.git配置文件中,因此每当密码更改时,我都必须删除.git文件夹或更改配置文件,这是不可取的。您可以控制git如何使用和存储凭据,只需查看git帮助凭据即可。您还可以通过git调用更改配置文件。更明智的做法仍然是简单地使用ssh密钥
Bash: dev/tty no such command or device 
Error: couldn't get username ..