简体   繁体   English

如何在所有开发人员都可以推送到的共享Windows计算机上创建git存储库

[英]How to create a git repository on a shared windows machine which all developers can push to

I have created a bare Git repository on a shared windows machine on a local area network. 我已经在局域网上的共享Windows计算机上创建了一个裸露的Git存储库。 I am experiencing a problem in which nobody else but me is able perform a push operation. 我遇到了一个问题,除了我以外,其他任何人都无法执行推送操作。 When trying to sync with or push to the remote repository using the Visual Studio 2013 Git tools, other users receive an error reading "Opening repository: .The following errors were reported during push: refs/heads/master, Failed to rename lockfile to '/refs/heads/master': Access is denied." 当尝试使用Visual Studio 2013 Git工具与远程存储库同步或将其推送到远程存储库时,其他用户将收到错误消息“正在打开存储库:。在推送过程中报告了以下错误:refs / heads / master,无法将锁文件重命名为' / refs / heads / master':拒绝访问。” There seem to be a lot of similar questions about creating a shared repository on stack overflow though none of them have given me the right solution for my problem. 关于在堆栈溢出时创建共享存储库的问题似乎很多,尽管它们都没有为我的问题提供正确的解决方案。 One thought is that I may need to create a repository user group, perhaps based on our domain user groups, though I do not have any idea how to do this with Git on Windows and have not found any resources for instructions as of yet. 一个想法是,我可能需要基于我们的域用户组创建一个存储库用户组,尽管我不知道如何在Windows上使用Git来执行此操作,并且到目前为止还没有找到任何说明资源。

You can share the folder that contains the bare git repository, and just add those Windows users as people who can read and write to those folders. 您可以共享包含裸git存储库的文件夹,只需将那些Windows用户添加为可以读写这些文件夹的人即可。 After making a folder "shared" Windows should tell you what the network path should be. 将文件夹设为“共享”后,Windows应告诉您网络路径。 Then it's a simple git clone file:////MACHINE_NAME/path/repo.git . 然后是一个简单的git clone file:////MACHINE_NAME/path/repo.git

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM