Skip to content
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

Install with private deps fails using usethis git credentials #792

Open
latot opened this issue Apr 1, 2024 · 3 comments
Open

Install with private deps fails using usethis git credentials #792

latot opened this issue Apr 1, 2024 · 3 comments

Comments

@latot
Copy link

latot commented Apr 1, 2024

Hi, this might be similar to #758, also the pak library works for this case, but is ideal to work here too.

Rn using usethis we can use git credentials: https://stackoverflow.com/a/71846333/4652030

Still not the ideal case thinking we could use the actual git credentials instead register two in the same system, but still following that we have two credentials on the system to download private repos.

After following the steps, we can install the private repo, the problem is that when the project has a private dependency, if this is the case we will not be able to install the package with:

Downloading git repo https://github.com/CIT-UAI/rtestB
'/usr/bin/git' clone --depth 1 --no-hardlinks https://github.com/CIT-UAI/rtestB /tmp/RtmpuXMEtf/file386464b17622a
Clonando en '/tmp/RtmpuXMEtf/file386464b17622a'...
remote: Enumerating objects: 7, done.
remote: Counting objects: 100% (7/7), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 7 (delta 0), reused 6 (delta 0), pack-reused 0
Recibiendo objetos: 100% (7/7), listo.
Error: Failed to install 'unknown package' from Git:
  HTTP error 404.
  Not Found

  Did you spell the repo owner (`CIT-UAI`) and repo name (`rtestC`) correctly?
  - If spelling is correct, check that you have the required permissions to access the repo.

So seems the usethis git credentials are picked for the main project, but not parsed to the deps.

Thx!

@gaborcsardi
Copy link
Member

It is very possible that remotes sends the same credentials for all repositories, which is certainly not great. In any case, we are focusing on pak, so if you can use pak, that's a great workaround.

@latot
Copy link
Author

latot commented Apr 1, 2024

will pak replace remotes? I'm thinking that devtools uses remotes instead of pak.

@gaborcsardi
Copy link
Member

Yes, devtools will use pak in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants