有没有办法让 git-push 交互?
在我的远程 git 服务器上,我有一个预接收挂钩,它将使用 rcleartool 的非交互式命令签入(提交)到 Clearcase 存储库中。我正在做的工作本质上是一个 git 到 Clearcase 的桥梁。不幸的是,这个提交命令需要用户名和密码作为参数。理想情况下,我希望在调用 git-push 命令时提示客户端输入用户名和密码,然后将其传递到clearcase commit 命令中。但是,git-push 的文档指出我只能将消息回显给客户端,因此看起来我无法提示用户输入。
有谁知道解决这个问题的方法吗?
有没有人尝试过一些方法来使 git-push 看起来具有交互性并取得成功?
任何帮助将不胜感激。
On my remote git server, I have a pre-receive hook that will check-in (commit) into a clearcase repository using rcleartool's non-interactive command. What I'm working on is essentially a git to clearcase bridge. Unfortunately, this commit command requires a username and password as arguments. Ideally, I would like the client to be prompted for the username and password when the git-push command is invoked, which will then be passed into the clearcase commit command. However, the docs for git-push state that I can only echo messages back to the client, thus it looks like I cannot prompt the user for input.
Does anyone know of a way around this?
Has anyone tried something to make git-push seem interactive and succeed?
Any help would be grateful.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果没有交互式
git-push
,就没有简单的解决方案。一种可能的方法是在用户推送和
rcleartool
结账
。例如,如果您有
gitolite
,基于强制命令 ssh 原理,然后您可以使用该中间脚本来:user.name
git 属性更确定)有了这两个附加信息,Git 服务器就可以继续执行
rcleartool checkout
部分。Without having an interactive
git-push
, there is no easy solution for this.One possible way would be to have an intermediate between the user push and the
rcleartool
checkout
.If you have
gitolite
for instance, based on the forced command ssh principle, you can then used that intermediate script to:user.name
git property)With those two additional informations, the Git server can then proceed with the
rcleartool checkout
part.