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

support installation from git remotes via git clone #705

Open
kevinushey opened this issue Oct 11, 2024 · 3 comments
Open

support installation from git remotes via git clone #705

kevinushey opened this issue Oct 11, 2024 · 3 comments

Comments

@kevinushey
Copy link

For example:

> pak::pkg_install("git::[email protected]:rstudio/gt.git")
Error: 
! error in pak subprocess
Caused by error: 
! Could not solve package dependencies:
* git::[email protected]:rstudio/gt.git: ! pkgdepends resolution error for git::[email protected]:rstudio/gt.git.
Caused by error: 
! Failed to download DESCRIPTION from git repo at <://[email protected]:rstudio/gt.git>.
Caused by error in `(function (e) …`:
! URL rejected: Port number was not a decimal number between 0 and 65535
Type .Last.error to see the more details.

The equivalent remotes invocation works.

> remotes::install_git("[email protected]:rstudio/gt.git")
Downloading git repo [email protected]:rstudio/gt.git
'/usr/bin/git' clone --depth 1 --no-hardlinks [email protected]:rstudio/gt.git /var/folders/9n/3nxsgkrj0rlfx196kzdttpww0000gn/T//RtmpOChrAp/filebbe42139d5f2
Cloning into '/var/folders/9n/3nxsgkrj0rlfx196kzdttpww0000gn/T//RtmpOChrAp/filebbe42139d5f2'...
Running `R CMD build`...
* checking for file ‘/private/var/folders/9n/3nxsgkrj0rlfx196kzdttpww0000gn/T/RtmpOChrAp/filebbe42139d5f2/DESCRIPTION’ ... OK
* preparing ‘gt’:
* checking DESCRIPTION meta-information ... OK
* checking for LF line-endings in source and make files and shell scripts
* checking for empty or unneeded directories
Removed empty directory ‘gt/man/figures’
* building ‘gt_0.11.1.9000.tar.gz’
Installing package into ‘/Users/kevin/scratch/renvious123/renv/library/macos/R-4.4/aarch64-apple-darwin20’
(as ‘lib’ is unspecified)
* installing *source* package ‘gt’ ...
** using staged installation
** R
** data
*** moving datasets to lazyload DB
** inst
** byte-compile and prepare package for lazy loading
** help
*** installing help indices
** building package indices
** testing if installed package can be loaded from temporary location
** testing if installed package can be loaded from final location
** testing if installed package keeps a record of temporary installation path
* DONE (gt)
@kevinushey kevinushey changed the title support installation from git remotes via ssh support installation from git remotes via git clone Oct 11, 2024
@gaborcsardi
Copy link
Member

SSH is not supported, only HTTPS:

pak::pkg_install("git::https://github.com/rstudio/gt.git")

@kevinushey
Copy link
Author

Is this something that might change in the future, or should I discourage this in renv? I suppose I could also transform such SSH URIs into https URIs, at least for GitHub.

@gaborcsardi
Copy link
Member

It is unlikely that it would change any time soon.

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