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 (
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?
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?
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
# 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 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: "" `
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 :)