Git server and PATH issues  [Accepted]

Discussion of applications not mentioned above.
Post Reply
User avatar
Maniform
Posts: 16
Joined: 25 Nov 2025, 00:17
Canada

Git server and PATH issues

Post by Maniform »

Hello team,

I tried to setup a git server on my F4-424. To get the git features, I installed ModBase1 (https://tmnascommunity.eu/download/modbase1/) from the community. Git setup is correct and the PATH is setted.

What I did :
  • Create a shared folder called "git" in Volume1
  • In git, create a project folder "test.git"
  • In this folder, I ran the command

    Code: Select all

    git init --bare
  • On my PC, I tried to clone with

    Code: Select all

    git clone ssh://[email protected]:9222/Volume1/git/test.git
    it ask me for my password then returns error

    Code: Select all

    bash: line 1: git-upload-pack: command not found
    fatal: Could not read from remote repository.
    
    Please make sure you have the correct access rights
    and the repository exists.
    
From what I found, it seems to be an issue with the PATH. When I log in with SSH, git-upload-pack is available without any further configuration (PATH is right) but through a git command, the PATH is not setted the same way so some git features are not available.

Some workarounds require to edit ssh config from the NAS, but TOS seems to ignore .ssh folder or any .profile/.bashrc configurations.

The only working way I found for now is to use a Raspberry Pi as a git server. I mounted /Volume1/git to my Pi then I use

Code: Select all

git clone ss://user@raspberrypi/mnt/git/test.git
and it works perfectly.

Any solution to make a git server on TOS 6 ?

[System Informations]
  • Model: F4-424
  • Version: TOS 6.0.794-01324
  • ModBase1 version: 1.00.22
User avatar
TMzethar
TM Support
Posts: 2815
Joined: 27 Oct 2020, 16:43

Re: Git server and PATH issues

Post by TMzethar »

It may be a permission issue. Could you please confirm if you are using the superuser on the TNAS system? Only the superuser has the permission to access via SSH.
To contact our team, please send email to following addresses, remember to replace (at) with @:
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
Maniform
Posts: 16
Joined: 25 Nov 2025, 00:17
Canada

Re: Git server and PATH issues

Post by Maniform »

I use my account that is administrator.
I see there's a "super" folder in homes so maybe there's a "super" user hidden somewhere. I tried it but I don't have the password and I can't find it anywhere in the documentation.

Just to clarify, I tried my admin password on super account but it's not working.
User avatar
TMzethar
TM Support
Posts: 2815
Joined: 27 Oct 2020, 16:43

Re: Git server and PATH issues

Post by TMzethar »

Perhaps you can learn about relevant information here.
viewtopic.php?t=1476&hilit=ModBase1
To contact our team, please send email to following addresses, remember to replace (at) with @:
Technical team: support(at)terra-master.com (for technical support)
Service team: service(at)terra-master.com (for purchasing, return, replacement, RMA service)
User avatar
Maniform
Posts: 16
Joined: 25 Nov 2025, 00:17
Canada

Re: Git server and PATH issues

Post by Maniform »

Maybe I'm missing something but I can't find any way to make it work through ssh without customizing the system.

I'm investigation a way using docker to make it work natively.
User avatar
Maniform
Posts: 16
Joined: 25 Nov 2025, 00:17
Canada

Re: Git server and PATH issues  [Accepted]

Post by Maniform »

FIXED !!! I found a way with no big modifications and it's working !

I was able to see the content of PATH through ssh commands with

Code: Select all

ssh -t <user>@<tnas> -p <port> 'echo $PATH'
Logging with ssh and showing PATH doesn't give same result.

The PATH contains

Code: Select all

/usr/local/bin
but by default, there's no such dir. I created it and created symbolic links to every git command.

Code: Select all

mkdir /usr/local/bin
ln -s /usr/local/ModBase1/sys/bin/git /usr/local/bin/git
...
[Repeat for every git binary]
...
Now git server works !

Just so you know, I first created a symbolic link of full ModBase1's bin folder. It works too but it shows following issues everytime you log in with ssh after that. I guess it causes conflicts with other existing binaries.

Code: Select all

dirname: missing operand
Try 'dirname --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
dirname: missing operand
Try 'dirname --help' for more information.
Post Reply

Return to “Others”