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, Kudos For The 0.15 Guys! I Am Having An Issue Related To Git Auth: I Have An Issue With Trains-Agent (0.15): It Does Not Use Git Creds While Trying To Clone A Private Repo:

Hi, kudos for the 0.15 guys! I am having an issue related to git auth:
I have an issue with trains-agent (0.15): it does not use git creds while trying to clone a private repo:
fatal: could not read Username for ' ': No such device or addressThe weird thing is that this repo is a dependency of the actual repo where the experiment lives. The agent successfully clones the actual repo though! (This repo is also private) Any idea?

  
  
Posted 4 years ago
Votes Newest

Answers 18


Thank you! 🙂

  
  
Posted 4 years ago

Hi JitteryCoyote63 could you provide a bit more details, is this a repo for a python module (i.e. in the installed pacakges) or a submodule ?

  
  
Posted 4 years ago

both are repos for python modules (experiment one and dependency of the experiment)

  
  
Posted 4 years ago

Yes, that's what it looks like. Somehow when you clone the experiment repo, you correctly set the git creds in the url, but when the dependencies are installed, the git creds are not taken in account

  
  
Posted 4 years ago

(I didn't have this problem so far because I was using ssh keys globaly, but I want know to switch to git auth using Personal Access Token for security reasons)

  
  
Posted 4 years ago

If you are using user/pass for the git (i.e. not ssh key) we are not passing it to the pip install (and come to think about it, we probably should?!)

  
  
Posted 4 years ago

but when the dependencies are installed, the git creds are not taken in account

I have to admit, we missed that use case 😞
A quick fix will be to use git ssh, which is system wide.

but I want know to switch to git auth using Personal Access Token for security reasons)

Smart move 😉

As for the git repo credentials, we can always add them, when you are using user/pass. I guess that would be the behavior you are expecting, unless the domain is different... Maybe a flag to turn it off, if you want?!

  
  
Posted 4 years ago

unless the domain is different

 ?

Imagine that you are working with both github and bitbucket for example, if you are using git-ssh than git will know which of the domains to send the key to. Currently there is a single user/pass entry so all domains will get the same credentials. But I think this is a rare use case.

  
  
Posted 4 years ago

I am not sure what you mean by unless the domain is different ? Personal Access Token are designed such that to allow cloning a private repo, the user has to give the PAT full access to repos, including public repos. So it should also work with all other git repos

  
  
Posted 4 years ago

I also don't understand what you mean by unless the domain is different... The same way ssh keys are global, I would have expected the git creds to be used for any git operation

  
  
Posted 4 years ago

Would be very cool if you could include this use case!

I totally think we should, any chance you can open an Issue, so this feature is not lost?

  
  
Posted 4 years ago

Would be very cool if you could include this use case!

  
  
Posted 4 years ago

yes, will do now!

  
  
Posted 4 years ago

I finally found a workaround using cache, will detail the solution in the issue 👍

  
  
Posted 4 years ago

Done! Also I tried to use git cache ( https://git-scm.com/docs/git-credential-cache ) as a workaround (hoping that the first time it clones the experiment repo, it caches the creds for the next times, but I then get a different error: fatal: unable to find a suitable socket path; use --socket )

  
  
Posted 4 years ago

Done!

Thanks

fatal: unable to find a suitable socket path; use --socket

 )

Look here https://stackoverflow.com/questions/5015732/why-do-i-get-unable-to-connect-a-socket-when-i-try-to-clone-via-a-git-url

I think that's the root cause, we should probably also add https://github.com/allegroai/trains-agent/issues/16

  
  
Posted 4 years ago

JitteryCoyote63 did you add the bash script here: https://github.com/allegroai/trains-agent/blob/master/docs/trains.conf#L99

  
  
Posted 4 years ago

See my answer in the issue - I am not using docker

  
  
Posted 4 years ago
770 Views
18 Answers
4 years ago
one year ago
Tags
Similar posts