pkgdepends fails to download from private git url, despite successfully resolving dependencies

Open
#349 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
git, r
Domain
tooling

Research direction

Start in src/library/pkgdepends/R/type-git.R, comparing type_git_get_data() with async_git_download_repo() and git_download_repo(). Reproduce with an Enterprise GitLab URL and gitcreds credentials, then inspect the RemoteSha indexing and the writeBin() error path. Done means a private Git repository resolves and downloads successfully through pkgdepends.

Written by the indexing model from the issue text.

Description

bug

I tried my best to track this issue down, but it's been a bit tricky to navigate the pak private library and async. Hopefully I'm close enough that the bug report is useful.

Reproducing the error

I'm struggling to find a way to make a full reprex, but the situation is

  • Enterprise GitLab
  • Using username and access token configured via gitcreds
spec <- "pkgname=git::https://enterprise.com/org/pkgname.git"
prop <- pkgdepends::new_pkg_installation_proposal(spec)
prop$download()
# ℹ Getting 13 pkgs with unknown sizes
# ✖ Failed to download pkgname 0.0.0.9000 (source)
# ✔ Cached copy of RColorBrewer 1.1-3 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
# ✔ Cached copy of colorspace 2.1-0 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
# ✔ Cached copy of farver 2.1.1 (x86_64-pc-linux-gnu-ubuntu-22.04) is the latest build
# ...
# ✖ Failed to download 1 package. 
Best effort at debugging

Given the remote,

[!NOTE]
while exploring this, this line seems like it's improperly indexed and I had to make the following modification just to attempt a download:

- sha <- resolution$metadata[[1]][["RemoteSha"]]
+ sha <- resolution$metadata[["RemoteSha"]]
Dominant language
C
Stars
135
Forks
47
PR merge metrics
No merged PRs in 30d

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from r-lib/pkgdepends

All issues in r-lib/pkgdepends

Similar issues

More C issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.