Hi,
I'm using the dockerized version of trains get an understanding of trains.
While trying to play with the trains.conf settings in ~/trains.conf I got in a state, where the agent is not been able to clone my repo from http://gillab.com
` cloning: git@gitlab.com:laiki/sync_eod.git
Host key verification failed.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Repository cloning failed: Command '['clone', 'git@gitlab.com:laiki/sync_eod.git', '/root/.trains/vcs-cache/sync_eod.git.0cc059f51a5b2e845d875ae71a3e4908/sync_eod.git', '--quiet', '--recursive']' returned non-zero exit status 128.
trains_agent: ERROR: Failed cloning repository.
- Make sure you pushed the requested commit:
(repository='git@gitlab.com:laiki/sync_eod.git', branch='master', commit_id='fde0feded5f8cea36e880e16a33aea828bc970e5', tag='', entry_point='eodsync.py', working_dir='.')
- Check if remote-worker has valid credentials [see worker configuration file]
DONE: Running task 'e898191391cb49c2a8452583b169a900', exit status 1 I created this repository with public access, so everyone should be able to clone it, that's why I wonder. I wanted to check the git output which as the output above should be in /root/.trains/... of the docker container running the 'services' queue where I wanted it to be enqueued, but the folder is empty
root@eef65c53d8b6:~/.trains/vcs-cache# pwd
/root/.trains/vcs-cache
root@eef65c53d8b6:~/.trains/vcs-cache# ps x
PID TTY STAT TIME COMMAND
1 ? Ss 0:00 /bin/sh /usr/agent/entrypoint.sh
11 ? Sl 0:09 /usr/bin/python3 /usr/local/bin/trains-agent daemon --services-mode --queue services --create-queue --docker ubuntu:18.04 --cpu-only
122 pts/0 Ss 0:00 bash
142 pts/0 R+ 0:00 ps x
root@eef65c53d8b6:~/.trains/vcs-cache# ll
total 8
drwxr-xr-x 2 root root 4096 Oct 21 19:26 ./
drwxr-xr-x 35 root root 4096 Oct 31 15:21 ../
root@eef65c53d8b6:~/.trains/vcs-cache# `the container I searched in is the one using the image 'allegroai/trains-agent-services:latest'
To check if it is might be a http://gitlab.com related issue, so I will retry with http://gilhub.com and post the result here.
Independently from the git host, is it possible to add ssh keys to the agents?
I would liek to enable the trains-agents to access private repositories by adding their ssh keys to the profile settings on gitlab/github.
update:
Cloning from http://gihub.com succeeded.
cloning:
Note: checking out 'fde0feded5f8cea36e880e16a33aea828bc970e5'. ... url:
branch: HEAD commit: fde0feded5f8cea36e880e16a33aea828bc970e5 root: /root/.trains/venvs-builds/3.6/task_repository/sync_edo.git ... sh: 1: wget: not found
BR
Wasili