Page MenuHomePhabricator

toolforge-jobs should be able to run git with ssh
Closed, DuplicatePublic

Description

(at least in some images)

Steps to reproduce

  1. $ echo "cd myproject && git pull" > everyday.sh
  2. $ toolforge-jobs run myscheduledjob --command ./everyday.sh --image tf-bullseye-std --schedule "0 23 * * *"

Expected behavior
Git and ssh should be there to use.

Current behavior
On buster/bullseye (standalone) there is no git:

$ cat myscheduledjob.out 
$ cat myscheduledjob.err
./everyday.sh: line 2: git: command not found
./everyday.sh: line 2: git: command not found

On python39 and others (sssd) there is no ssh:

$ cat myscheduledjob.out 
Your branch is ahead of 'origin/master' by 264 commits.
  (use "git push" to publish your local commits)
Your branch is ahead of 'origin/master' by 264 commits.
  (use "git push" to publish your local commits)
$ cat myscheduledjob.err 
Switched to branch 'master'
error: cannot run ssh: No such file or directory
fatal: unable to fork
Already on 'master'
error: cannot run ssh: No such file or directory
fatal: unable to fork

Event Timeline

Chances are good that you do not actually need ssh and can use git over https instead. See T258841: Add ssh-client support to Kubernetes containers for related discussion.

So my options are https or OAuth. Neither convenient :/

Also, totally unrelated and off-topic, but how can one restart webservice from k8s jobs? I used to use jlocal in crontab for that, but I feel like this option will be removed once grid is gone for good.

It is a blocker for me as I use ssh to git push on one of my projects

Dvorapa updated the task description. (Show Details)