-
Notifications
You must be signed in to change notification settings - Fork 153
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
Failed to install 'unknown package' from GitLab #706
Comments
Just a polite "bump" of this issue. I still have the problem, and judging from other reactions I suspect others do too... Any ideas? Thank you |
This code, from the tests also fails:
with the message:
The link in the error message opens normally in a browser. |
I am seeing the same problem, both for installing a package from a self-hosted instance, and also for the test case If I copy and paste the URL reported in the error message into Firefox, the browser opens the DESCRIPTION file correctly. I'm using R 4.2.2 and remotes 2.4.2. |
Doing the following solved it for me:
|
Did you mean to leave a comment about solving a GitHub problem in an issue about a GitLab (not GitHub) API problem? |
Skip step 1 if not installing from GitHub. I figured the underlying HTTP/TCP issue applies regardless of which remote it tries to connect to. |
This didn't solve the problem for me, but I don't have the machine admin rights needed to install |
I suggest you try the pak package for GitLab repos, it should work better. |
Just a quick update - I have tried pak and that also didn't work. I'm still investigating. |
I am also having problems with our own Gitlab istance. Previously I could install a gitlab package in my CI-Runners like this: But we upgraded now to Gitlab v17 and now I am seeing this error aswell:
But I can open that URL in the browser and see the DESCRIPTION file.. I also tried My current solution is back to basics with
|
Also still a problem for me |
I have a similar issue for a package that I have on a private repo on gitlab.com.
Here also, the URL does open in a browser. Now, if I set the repo to public and try to install without the token then it goes through.
In that case the URL follows the format described in the first comment. |
Did you use a user-based personal access token or a repository access token? |
I used a repository access token. Indeed, a user-based PAT did work for me too but only when used by itself and not within
|
I am experiencing this problem when trying to install from a self-hosted gitlab instance.
I am on R4.2.0, RStudio 2022.02.3 Build 492, and remotes v2.4.2
remotes::install_gitlab(repo = "<username>/<project>", host = "gitlab.<mydomain>.com", auth_token = gitlab_pat())
fails and results in:
The URL in the error message loads correctly in the browser.
My comment on the issue linked below details some previous behaviour that enabled me to install through a standalone R session, but not through RStudio. This workaround no longer functions, and the R session now reports the same error. I can no longer install or update any of the packages from our internal server.
[Failed to install 'unknown package' from GitLab](#490 (comment))
The key appears to be the appearance of the project ID in the gitlab V4 API url.
This is the documentation page detailing the API that results in a successful install:
https://docs.gitlab.com/ee/api/repositories.html#get-file-archive
The function
remote_download.gitlab_remote
appears to follow the structure of this API, but the URL that fails is not of this structure. If anyone can give some debugging hints I am happy to dig and work on a solution.Thank you for maintaining a brilliant package!
The text was updated successfully, but these errors were encountered: