【问题标题】:Piping to Git Pull管道到 Git 拉
【发布时间】:2015-02-06 23:50:18
【问题描述】:

在我的工作场所,我正试图加快我的启动过程,所以我正在编写一个 BASH 脚本来为我完成它。

它需要做的一件事是执行多个 git pull 命令

我想做的是让脚本从一开始就获取一次我的密码,然后将该响应传递到每个 git pull 命令中。

但是 echo $password | git pull 似乎什么也没做。

有没有办法通过管道进入 git pull,如果有,我该怎么做?

【问题讨论】:

标签: git bash piping


【解决方案1】:

不要那样做 - 使用 gitcredentialscache credential helper

git config credential.helper 'cache --timeout=300'

【讨论】:

  • 谢谢。我还没有在我的脚本中实现它,但我确实在终端中尝试过它并且它有效。
  • 更新。我现在已经更新了我的脚本,它运行良好。
猜你喜欢
  • 2016-02-13
  • 2018-12-10
  • 2018-04-29
  • 1970-01-01
  • 2016-09-03
  • 1970-01-01
  • 1970-01-01
  • 2013-09-23
  • 2013-10-31
相关资源
最近更新 更多