1st, my setup:

  1. Ubuntu 14.04 Linux desktop machine with /home/david mounted as an NFS share (from a file server). The Git repo is cloned into /home/david/work from a master repo (which resides elsewhere on the network)

  2. A (strong CentOS) build machine, contacted via SSH, in which the same home directory is mounted as an NFS share.

  3. Username/password for both development and build machines are provided by LDAP (I think...). Username david (UID=something big) is part of dev group (GID=11000)

  4. A laptop running win10 with an Ubuntu16.04 (Oracle) virtualbox VM. Currently the Ubuntu's VM signle username is 'vmuser'

Problem/Requirement: How to setup access to he git repo on the laptop? Preferably inside the Ubuntu VM...

A. Mapping the /home/david NFS share an a network drive in win10 enables me to access (read/write) the source files, but trying to do git checkout a different branch or other git operations, fail due to permission errors.

B. Mounting the /home/david NFS share, in the Ubuntu16.04 VM, via /etc/fstab as /remote_source works, but only root can write to the files or do git operations.

B.1. After mounting I tried to chown -R /remote_source to vmuser:vmuser but it fails.

B.2. Thought of doing chmod +w for (other groups) and to add vmuser to group dev, but I failed to add vmuser to the group (it's not a local group in /etc/group, it comes from the LDAP...)

B.3. I'm not sure what will be the effect of changing the ownership/mode of all the files from a Git perspective - will all of them be marked as changed and need to be committed?

B.4. Maybe I need to setup the Ubuntu VM to have a david user (with same UID/GID?) like the native Linux? How to do this?

C. Is this issue related to Linux/NFS credentials or more to Git permissions/repo setup?

Any clarifications/workarounds/tips/answers will be much appreciated!

  • If you are using the "local" Git protocol then everything relies on standard file access. But it could be simpler to use a Git server. – xenoid Aug 9 '17 at 23:46
  • @xenoid: U mean that I need to install/run a Git server on the Ubuntu desktop? – DaGN Aug 10 '17 at 14:07
  • On any computer that the others can access. The CentOS would be a good candidate (of course, the Git server and the Git repo used to do the builds will be different things). – xenoid Aug 10 '17 at 14:17

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.