Aloha,
I read in the latest January blog, that there’s a bug fix for “Commit archive to git”
Before I even didnt know, that this is even possible.
So I was curious and updated to the latest rolling release and thought I give it a try.
Vyos version is VyOS 1.5-rolling-202502030007
When I configure:
set system config-management commit-archive location git://[email protected]:marcel/configs.git
and then actual commit, I receive the following error:
Archiving config...
git://git.lab.sprengkraft.ua:marcel/configs.git Unable to upload "git://[email protected]:marcel/configs.git/config.boot-RTR01.lab.sprengkraft.ua.20250210_170314": [Errno 2] No such file or directory: " ['git', 'clone', '[email protected]:marcel/configs.git', '/tmp/git-commit-archive-clxsflfz/repository', '--depth=1']"
run-parts: /etc/commit/post-hooks.d/02vyos-commit-archive exited with return code 1
Unfortunately I really dont understand what that means.
The directory post-hooks.d looks like this:
ls -la /etc/commit/post-hooks.d/
total 13
drwxr-xr-x 1 root root 4096 Feb 10 17:03 .
drwxr-xr-x 1 root root 4096 Feb 3 02:07 ..
-rwxr-xr-x 1 root root 226 Sep 10 2023 00vyos-sync
lrwxrwxrwx 1 root vyattacfg 20 Feb 10 14:00 01vyos-commit-revision -> /usr/bin/config-mgmt
lrwxrwxrwx 1 root vyattacfg 20 Feb 10 17:03 02vyos-commit-archive -> /usr/bin/config-mgmt
lrwxrwxrwx 1 root root 37 Feb 3 02:07 10vyatta-log-commit.pl -> /opt/vyatta/sbin/vyatta-log-commit.pl
lrwxrwxrwx 1 root root 46 Feb 3 02:07 99vyos-user-postcommit-hooks -> /opt/vyatta/sbin/vyos-user-postcommit-hooks.sh
And in the /usr/bin/config-mgmt
I dont see any GIT related config.
Then I rememebered, that for ssh agent to work, in the ssd_config the
‘’’ AllowAgentForwarding yes ‘’’
should be set to yes, right?
Well, in my sshd_config it was set to no
So I enabled this in the sshd_config file, restartet the sshd,
now the commit still fails, but I’ve got different output:
commit
Archiving config...
git://git.lab.sprengkraft.ua:marcel/configs.git Unable to upload "git://[email protected]:marcel/configs.git/config.boot-rtr01.home.sprengkraft.ua.20250210_171419": [Errno 2] No such file or directory: " ['git', 'clone', '[email protected]:marcel/configs.git', '/tmp/git-commit-archive-vlxa8cru/repository', '--depth=1']"
run-parts: /etc/commit/post-hooks.d/02vyos-commit-archive exited with return code 1
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_ADDRESS = "de_DE.UTF-8",
LC_NAME = "de_DE.UTF-8",
LC_MONETARY = "de_DE.UTF-8",
LC_PAPER = "de_DE.UTF-8",
LC_IDENTIFICATION = "de_DE.UTF-8",
LC_TELEPHONE = "de_DE.UTF-8",
LC_MEASUREMENT = "de_DE.UTF-8",
LC_TIME = "en_GB.UTF-8",
LC_NUMERIC = "de_DE.UTF-8",
LANG = "en_US.UTF-8"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
[edit]
Should this work in general?
Thanks
MArcel