question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

git creds are not used when install packages

See original GitHub issue

Context

  • An experiment lives in a private repo
  • agent.git_user and agent.git_pass are configured in trains.conf
  • This experiment is a python package installed at runtime
  • This python package has dependencies
  • Among the dependencies, one is another private repository

Problem

trains-agentwill successfully clone the private repo where the experiments lives using the git credentials configured. But it will fail installing the dependencies, because one of them is a private repo and trains-agent won’t use the configured git credentials for the installation of the dependencies.

Solution

trains-agent should use the git credentials for any git operation, regardless of when it happens.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:14 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
bmartinncommented, Jun 22, 2020

@H4dr1en yep 😃 Should work with trains-agent==0.15.1

1reaction
bmartinncommented, Jun 8, 2020

@H4dr1en makes total sense 😦 I think we will have to make sure we pass the correct git credentials for pip. This means trains-agent will take this line:

my-dependency-package @ git+https://github.com/H4dr1en/my-dependency-package@92kv9gk3b1cabf08a0b45d87fk3e70bd73a7bc94

and will pass to pip this line instead:

my-dependency-package @ git+https://user:pass@github.com/H4dr1en/my-dependency-package@92kv9gk3b1cabf08a0b45d87fk3e70bd73a7bc94
Read more comments on GitHub >

github_iconTop Results From Across the Web

Missing credentials when attempting to install dependency ...
I'm using pip to install my package inside the Docker image, so it doesn't appear to have any notion of the Poetry credentials...
Read more >
gitcredentials Documentation - Git
To use a helper, you must first select one to use. Git currently includes the following helpers: cache. Cache credentials in memory for...
Read more >
Adding Git credentials on Windows - Stack Overflow
This fix makes using Git credentials more friendly to Windows users: it allows a credential helper to communicate using CR/LF line endings ("DOS...
Read more >
Managing Git(Hub) Credentials - usethis
Make sure to use HTTPS URLs, not SSH, when cloning repos or adding new remotes: ... You will have the gitcreds package installed,...
Read more >
Managing SSH and Git Credentials in R
Windows does not include a native git installation by default. We recommended to use the latest version of Git for Windows. This bundle...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found