使用 Kerberos 进行提交后的 git-svn dcommit

发布于 2024-10-03 05:55:10 字数 243 浏览 0 评论 0原文

我想让 git 在提交时自动将本地更改推送到上游 subversion 存储库。 SVN 存储库使用 Kerberos 进行身份验证,因此无需将密码或任何内容硬编码到提交挂钩中。

执行此操作的明显方法是将“git svn dcommit”放入提交后钩子中,但不幸的是,git 似乎在调用钩子之前剥离环境变量(例如 Kerberos 需要的 KRB5CCNAME) 。

所以问题是:如何更改传递给提交挂钩的环境变量?

I'd like to have git automatically push local changes to the upstream subversion repo when a commit is made. The SVN repo authenticates using Kerberos, so there's no need to hardcode a password or anything into the commit hook.

The obvious way to do this is to put "git svn dcommit" into the post-commit hoook, but unfortunately, git appears to be stripping environment variables (like KRB5CCNAME, which Kerberos needs) before calling the hooks.

So the question is: how do I change the environment variables that are passed to the commit hook?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梦纸 2024-10-10 05:55:10

答案是环境变量被盒子上的 sudo 删除——我将它添加到要保存在 /etc/sudoers 中的环境变量列表中。

事实证明这是早期 RHEL5 安装中的一个错误,现已修复。

The answer was the environment variable getting stripped by sudo on the box---I added it to list of environment variables to be preserved in /etc/sudoers.

Turns out it was a bug in earlier RHEL5 installations which has since been fixed.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文