Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escaping: Escape characters +-&|!(){}[]^"~*?:\ with \, e.g. \+
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
Answered
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

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.

  1. 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='.')
  2. 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

  
  
Posted 2 years ago
Votes Newest

Answers 4


In that case you should probably mount the .ssh from the host file-system into the docker. for example:
docker run -v /home/user/.ssh:/root/.ssh ...WickedGoat98 the above assumes your are running the docker manually, if you are using docker-compose.yml file the same mount should be added to the docker-compose.yml

  
  
Posted 2 years ago

AgitatedDove14 I use docker

  
  
Posted 2 years ago

WickedGoat98 I suspect the main difference is with GitHub your are cloning with https (i.e. not credentials needed) , but with gitlab you are using SSH authentication to clone the repository .If on the machine running the trains-agent you can "git clone" your repository (i.e. from command line), the trains-agent should be able to do the same (basically make sure you have the SSH keys in your ~/.ssh folder.

Are you testing the trains-agent service from (i.e. from the docker compose) or are you running trains-agent yourself ?

  
  
Posted 2 years ago

Ok, thanks for the support

  
  
Posted 2 years ago
99 Views
4 Answers
2 years ago
4 months ago
Tags