gpt4 book ai didi

git - 主推提交时写错误失败

转载 作者:太空狗 更新时间:2023-10-29 13:21:16 26 4
gpt4 key购买 nike

我在公司网络驱动器上有一个 git 存储库,从中提取没有问题。但是,我无法向其中提交任何内容,尽管我运气不错,但最近我什么也得不到。错误是:

C:\Program Files\Git\bin\git.exe push "origin" master:master error: Couldn't set refs/heads/master To //software/pdd.git/ ! [remote rejected] master -> master (failed to write) error: failed to push some refs to '//software/pdd.git/' Done

我怀疑它与 master 文件有关。在 Windows 上,它显示我可能已被放入不允许我进行修改但能够读取、写入和执行的网络组。

我的问题是:如果我之前能够推送几次,这个文件权限问题对我来说不应该是个麻烦。如果确实是我没有足够的权限进行修改,是否有解决方法?

PS:公司不愿意把我的网络组换成另一个,这样我就可以修改文件了。

最佳答案

检查问题“Pushing to a Git repository on an NFS share fails”:

The NAS is doing weird things to permissions, setting the sticky bit on all directories. This explains the behavior. An additional chmod solved the problem.

这意味着这是目标(远程)端的权限问题,如“Git issues after upgrading to osx Lion”所示:

there was an odd permission for everyone as ‘custom’. I updated this to be ‘Read & Write’ and the commit was finally successful.

作为“解决方法”,请参阅此 Error section :

I just deleted my bare repository and created a brand new one and pushed my changes over there. And everything works again.

关于git - 主推提交时写错误失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7278836/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com