Accessing a git repo

  • Existing system

    OMV 5 running RAID 5 on a separate PC

    OMV is setup with a SMB-CIFS share to allow the Win PCs to access the local git master - all works well

    The git access it managed by TortoiseGit on the Win PCs

    It is using a shared folder /git on the RAID system


    Under OMV, I have also enabled NFS


    Now, to try and wean myself off Win, I want to run a Linux/Mint PC on the same LAN and access that same git master repository.

    I have tried several of the Linux git GUIs and have managed to clone several projects from the OMV git repo, but no matter which git GUI I have tried, I have been unable to push updated data back to the master.


    The main issue I seem to be having is specifying the correct git protocol, but I am totally lost as to how to compose that with my current setup.

    Although, I am not too conversant with the command git line, I am prepared to learn more about that as well, once I sort out how to specify the correct protocol and am sure the OMV box is setup correctly for this.


    Any help, pointers or comments will be most appreciated :)

  • You can use a file url:


    Code
    file:///path/to/repo.git/


    Or setup gitea in a container.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • git can access repositoeies by ssh, http and file. If you mount a share you can use file protocol, if you set up a git service on omv using ssh, you can use ssh user@omv/path/to/repo.


    How do you clone the stuff, if you do not know the remote url?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • The cloning was taken care of by git GUIs such as Gittyup, though I did have to jump through some hoops to connect to the NAS SMB/CIFS directory before invoking the 'Clone directory' dialog so that it would show in the 'Choose Directory' dialog.


    This works for cloning, but not for pushing any changes.


    While the NFS share shows under 'Networks', I have not been able to connect to it via that icon.


    One of the problems I have is that I cannot figure out the path to the directory on my NAS.

    I have tried to compose a path for both git/https/ssh access, but even though I know the server 'hostname, -> mynas.local, I think, none of the path strings I have tried seem to work.

    As all of it fails, I can't be sure which part of the URL is wrong, or even whether the necessary services are enabled/installed on the NAS.


    When I jump through the hoops and connect to the git repo on NAS, Gittyup ends up using the URL

    /run/user/1000/doc/829de6f8/test.git


    However, that same URL does not work for a push.


    As I can use these git repos from Windows (clone & push) without issues, I have assumed that it is not a permissions problem.

  • Mount the share to a windows drive, then you get a path in windows.


    If you are using git more frequent, you should consider to do a proper setup of git. If it is only you who uses the git repo, you can do this easily using ssh. If you have coworkers, use gitea or gitlab, if you need it larger.


    If you need helt setting up gitea (with ssh) I can help.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thank you for the offer to help me set up gitea.


    As I am the only one using the git repos, I am very happy to accept your offer.


    First of all though, a question: I am running OMV 5 right now. I did try to upgrade to 6 some time ago but did not have any luck.

    Would it be best to try an upgrade first or how much trouble would it be to upgrade later with the gitea functionality installed already?

  • If we add gitea in a docker container, upgrading is not impacted at all, bit if your system does not upgrade properly, you will have to redo some o the config, so I would upgrade first.


    Did pushing work once you mount the share into your client?

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • My thoughts on upgrading would be to do a clean install of 6 to a small SSD and then swap it out for my current boot drive.


    Can I expect that to work? If so, I would try to upgrade over the weekend.


    As for pushing to the NAS git repo, none of the methods I have tried work for me, even if I have the client mounted and ready to clone.

  • A fresh install will work, you have to redo the config and mount the drives / file systems.


    Regarding git push:


    How did you mount the repo?


    if x:\repos\my-project.git is the repo the origin is file:///x/repos/my-projext.git (note the three slashes)

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • On a fresh install of 6, all the config changes stay on the new boot drive, correct??

    Then going back only involves swapping the old & new boot drives?


    The mounting is done behind the scenes it seems.


    The x:\repos\my-project.git is what has me stumped.

    AFAIK, my git repos are on the RAID drive in /git/test.git

  • All omv configs are on the system disk, so swapping the drive back will give you omv5 back.


    I do not understand how you are using git.

    What is your client you are using, which os, which frontend (if any)

    How do you clone give an example of the command line

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • Thank you for confirming the upgrade question.


    Because I have no clue as to the protocol or path I could/should use, I have tried several GUI front ends.

    Under Windows, I always use TortoiseGit

    Under linux/Mint I have tried just about every GUI available via the Software manager.

    Command line git is installed as a prerequisite, but of no use to me until I sort out the URL to be used.

    Currently, my workflow as a result of trial and error:

    From the Network directory on the desk top, I open up my NAS git SMB/CIFS share and select my git directory.

    Then, I have found that I can use Gittyup GUI front end to clone my project from the NAS using the available dialogs

    After launching Gittyup:

    Clone repository

    in the Clone Repo dialog, click on the '....' button

    in the 'Choose directory' dialog left hand pane,click on the '+' -> Other locations, which shows the options:

    'On this computer'

    Networks - git on mynas.local


    This highlights/selects mynas.local and then I can click on the 'Select' button which takes me back to the 'Clone directory' dialog with the URL field filled in as:

    /run/user/1000/doc/2916a198/smb-share:server=mynas.local,share=git


    With that setup I can then select where I want the 'clone' to end up.


    To commit to my local repo, I have been using git gui.

    But nothing I have tried allows my to push back to my NAS repo and that is where I am stuck :-(

  • From what you write, I assume you use Gittyup from linux.

    why don't you mount the nas share to a path on the local machine and clone from / push to there?


    I still do not understand where the problem is. You only need file access to the directory you store the repo.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

  • By now I have been able to upgrade to OMV 6, though it was a bit of a struggle with some real bumps in the road.


    From that experience alone, I would dearly love to have some document which spells out the important details of an existing configuration, preferably on a piece of paper. In the best case, one would not have to switch back and forth between the original and new installation to review specifics. In the worst case, if the original drive gets mangled or overwritten, it is hell to try and find where on the net one might be lucky enough to find pertinent information.


    For now, I think I have managed to get my git repos back on line and am gradually finding & figuring out equivalent apps and workflow under Mint to do the necessary things.


    Since I never really have used Linux/Mint in a networked environment before, there are a lot of uncertainties, but I think I have finally accepted that SMB/CIFS is the simplest (& best?) way to get what I need while I wean myself off Windows.


    If you think gitea - or some other method - would be a better option, I would be interested, but for now, it seems, I can get by with what I have.


    In any case, thank you for your patience. :)

  • the whole omv config is stored in a Text file in /etc/openmediavault/config.xml


    NFS is a bit faster and more natural to Linux, but smb is ok


    If the repos are only for your personal use and you do not need issues, wiki, web front-end, like github stay with file repos. More software requires more knowledge and configuration.

    If you got help in the forum and want to give something back to the project click here (omv) or here (scroll down) (plugins) and write up your solution for others.

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!