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
I'M Using

I'm using trains-agent to run an experiment from a private git repo and I run into this error
` trains_agent: ERROR: Failed cloning repository.

  1. Make sure you pushed the requested commit:
    (repository=<xxx>, branch=<xxx>, commit_id=<xxx>, tag='', entry_point='test_plotly2.py', working_dir=<xxx>)
  2. Check if remote-worker has valid credentials [see worker configuration file] `Where is the worker configuration file located so that I can add GitHub credentials?

Also, the script that runs the experiment is not part of the git repo (it is added to .gitignore) as it is a test script. Would trains-agent still be able to run the experiment? I'm assuming that trains copies the execution script irrespective of whether it is committed or not. Is that correct?

  
  
Posted 3 years ago
Votes Newest

Answers 14


Hi SarcasticSparrow10 ,

Where is the worker configuration file located so that I can add GitHub credentials?

Trains Agent uses a trains.conf file (usually created using trains-agent init , see https://allegro.ai/docs/deploying_trains/trains_agent_install_configure/ ). You can use this file to set up your Git credentials (see example https://github.com/allegroai/trains-agent/blob/60eeff292d988e56542b63153effe78a8c7cf3eb/docs/trains.conf#L18 ), or you can use environment variable when running the Trains Agent ( TRAINS_GIT_USER and TRAINS_GIT_PASS )

  
  
Posted 3 years ago

SuccessfulKoala55
For security reasons I don't want to have my password written out in a file. I'm trying to use https://docs.github.com/en/free-pro-team@latest/github/authenticating-to-github/creating-a-personal-access-token (PAT) from Github but I get authentication error. Is there an issue using PAT?

  
  
Posted 3 years ago

Ok, So Git credentials are present at two locations - 1) outside the agent config and 2) inside it. I updated credentials at both locations and now I'm seeing agent.git_user = <username> in the dump, but I still have the same issue.
` # Set GIT user/pass credentials

leave blank for GIT SSH credentials

agent.git_user=<username>
agent.git_pass=<PAT>

extra_index_url: [" "]

agent.package_manager.extra_index_url= [

]

agent {
# unique name of this worker, if None, created based on hostname:process_id
# Override with os environment: TRAINS_WORKER_ID
# worker_id: "trains-agent-machine1:gpu0"
worker_id: ""

# worker name, replaces the hostname when creating a unique name for this worker                                                                                                                           
# Override with os environment: TRAINS_WORKER_NAME                                                                                                                                                         
# worker_name: "trains-agent-machine1"                                                                                                                                                                     
worker_name: ""

# Set GIT user/pass credentials (if user/pass are set, GIT protocol will be set to https)                                                                                                                  
# leave blank for GIT SSH credentials (set force_git_ssh_protocol=true to force SSH protocol)                                                                                                              
git_user: <username>
git_pass: <PAT>
# git_host: "" `
  
  
Posted 3 years ago

fatal: could not read Username for ' ': terminal prompts disabled error: Could not fetch originWhy is trains-agent trying read from terminal prompt instead of trains.conf ?

  
  
Posted 3 years ago

Great, thanks!

  
  
Posted 3 years ago

but when I try to clone the repo directly, PAT works.

  
  
Posted 3 years ago

For security reasons I don't want to have my password written out in a file. I'm trying to use

(PAT) from Github but I get authentication error. Is there an issue using PAT?

There shouldn't be any issue - they can be used as regular passwords... Maybe the issue is your Trains Agent can't locate the configuration? When the Agent starts, you should see the git username printed out as part of the configuration dump - can you locate it?

  
  
Posted 3 years ago

That makes sense. The configuration file is located at ~/trains.conf which I believe is the default location.

No I can't see my username printed out in the dump

  
  
Posted 3 years ago

I used trains-agent init to create the config file

  
  
Posted 3 years ago

Are you using the Agent's --docker flag?

  
  
Posted 3 years ago

SuccessfulKoala55 Yes, I am using the --docker flag.

You are right about the Keyring. Once I make sure credentials are stored in a secure way, it works as expected. Thanks :)

  
  
Posted 3 years ago

I'm using docker to run the experiment. Could it be that the config in the docker container doesn't have the git credentials?

  
  
Posted 3 years ago

This is probably git , not Trains Agent...

  
  
Posted 3 years ago

SarcasticSparrow10 is it possible you have a Keyring installed? If so, the reason is that the keyring tries to receive your input after the credentials are provided, but can't. You'll have to manually enter these credentials on the machine so that the keyring won't ask for your confirmation :)

  
  
Posted 3 years ago
600 Views
14 Answers
3 years ago
one year ago
Tags
Similar posts