-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use ssh to clone repos does not work #16
Comments
Hi @H4dr1en , It looks like you already made sure git_user/git_pass are empty, in which case, trains-agent counts on git to resolve the credentials. What is the repository link you have in the experiment itself, is it starting with https:// or git@github.com ?
Kudos for quickly sorting it out! It's a good question if we want to have trains-agent run the command for us automatically. EDIT: |
This is a link starting with https://
I think my confusion comes from the fact that in the configuration file is written:
So I assumed that if I leaved blank, it would always use ssh with whatever ssh key was configured in the machine for any git action. Maybe it would be more clear for the users if there was a parameter named
And then internally, if
Something like that would remove the confusion around this topic, WDYT? EDIT:
In my case, I don't mind since trains-agent is running on a instance dedicated to trains-agent. EDIT 2:
|
@H4dr1en I see now... the reason you had an issue in the first place is the fact the trains detected the repository with https (which means that on the machine that was running the initial code, the git was not configured with ssh), while the trains-agent machine was configured with SSH key. So what I would like is for trains-agent to automatically build "git@" link if it has no git user/pass, (or as you suggested, configured with Regrading implementation, just replacing "https://github.com/" with "git@github.com:" should actually be enough. Adding the git domain to the SSH key should be done by the user, as we do not want to add any arbitrary domain to a user's ssh certified machine list :) |
This is not blocking, I did on my machine and I can still pull any public repository. |
I am having trouble with a similar issue. Then I changed the remote to the ssh pattern. It is working when I clone manually. But when I try to build for this base task through trains-agent, I get a similar message to the reported above:
(I masked the real information but the important part is that the repo is git@...) How can I print a more detailed error message to check what is really going on? The --log-level DEBUG or ERROR options don't show any further information than the default. Here is the command I am running:
Thanks! |
Hi @pedropalb
It should solve the issue. BTW: |
Hi all, I think I have a related problem as it is related to ssh and trains.
How can I add my credentials for the trains to be able to clone the repos? It might be written somewhere, but I was unable to find it myself |
Hi @212792736 |
@212792736 I believe the issue your are facing is not related to the original issue I described. Could you please open a separate issue or get help on the trains Slack channel? I will close this issue because as of trains version 0.16 the original issue has been fixed 👍 |
Context
If I don't specify git user and git pass in the config, it should automatically use SSH.
Problem
I can see in the logs that it was well added (at startup user is root)
If I connect to the trains-agent, I can also test the connection to github:
But for some reason trains-agent does not succeed to clone the repo of the experiment (from the logs):
It looks like trains-agent still tries to clone using HTTP and fails because I did not specify creds in trains.conf file
Note: I could solve the problem by adding (from here):
at startup, but I think this should be handled by trains-agent, right?
EDIT:
The text was updated successfully, but these errors were encountered: