git2r | R bindings to the libgit2 library | Development Tools library
kandi X-RAY | git2r Summary
kandi X-RAY | git2r Summary
The git2r package gives you programmatic access to Git repositories from R. Internally the package uses the libgit2 library which is a pure C implementation of the Git core methods. For more information about libgit2, check out libgit2's website (Suggestions, bugs, forks and pull requests are appreciated. Get in touch.
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of git2r
git2r Key Features
git2r Examples and Code Snippets
Community Discussions
Trending Discussions on git2r
QUESTION
I have a local GitLab account with an R package that can be installed by:
...ANSWER
Answered 2020-Jul-08 at 21:14When I run renv::init() the package source is unknown.
renv
infers a package's source based on its DESCRIPTION
file, which (for custom remotes) is usually annotated post-hoc by the install function itself. I suspect install_git()
is not annotating the package in one of the ways expected by renv
, and so renv
is unable to infer the package source.
You could try and confirm this by checking the DESCRIPTION
file; e.g. a quick way to dump its contents would be:
QUESTION
I'm trying to clone a private repo with git2r::clone via SSH (not HTTPS protocol) in R by doing
git2r::clone("git@git.server.com:team_name/repo_name.git", "~/dev/")
but, I keep getting
Error in 'git2r_clone': unsupported URL protocol
What could be wrong?
I am authenticated to the repo via SSH and can clone using the same URL in the command line with git clone url
. I would like to avoid using https and entering my credentials into the URL.
I made sure to install libssh2
per this answer
ANSWER
Answered 2020-Feb-12 at 00:31This can happen if your git2r installation does not support SSH and therefore can't parse git SSH URLs.
You can confirm by running
libgit2_features()
in R.
If SSH is disabled, you will see
QUESTION
I'm trying to clone a repo in R with the git2r
package by doing
ANSWER
Answered 2020-Feb-11 at 02:22Assuming repo
is the variable name of your local directory string you want to clone to, it should be
QUESTION
I am struggling with installing a package from a gitlab repository on a windows computer.
I found different hints but still have problems to install my package from gitlab.
First of all, I generated a public and private key with puttygen.exe
The files need to be changed afterwards, I had to remove comments and stuff so they look like my the file on my unix system. So now, both public and private key files have just a single line.
I tried to install my package via devtools::install_git
which takes very long and I get the error message
ANSWER
Answered 2020-Jan-22 at 08:26After struggling for almost a day, I found a solution I can live with...
I first created a PAT (Personal Access Token) in my gitlab account and granted full API access. For some reason the read_only access didn't worked and I am now tired to figure out what the problem is.
After this I had still problems to install my package and for some reason, the wininet
setting for downloading doesn't work.
I used the command capabilities("libcurl")
to check if libcurl
is available on my windows, which was and tried to overwrite wininet
to libcurl
by using method='libcurl'
in the install function. Somehow, this was not enough so I overwrote the options variable download.file.method
directly.
QUESTION
I try to install devtools package in an Ubuntu 16.04 VM in which I am wrong.
Other packages I tried the installed successsfully
However I can't install it and the process in the console is this:
...ANSWER
Answered 2019-Jan-07 at 16:17Certainly, the answer is within the output you pasted. You need to install in the OS (as opposed as in R) the following dependencies:
libcurl4-openssl-dev libssl-dev
To install them, run in your terminal:
QUESTION
Using the instructions described in github and installing Java accordingly with Chocolatey -- plus installing rJava
and setting the path in R with Sys.setenv(JAVA_HOME = "C:/Program Files/Java/jdk1.8.0_131")
-- I've done the following in R:
ANSWER
Answered 2017-Jun-03 at 19:30Follow these steps in given order should work:
QUESTION
I have been tasked with testing the feasibility of a GitHub training programme in my place of work. Due to internal security, we cannot utilise the command line. I am attempting to:
- Initialise a new git repository
- Add files from my current R Project
- Commit these staged files
- Push to a newly created GitHub repo
All from RStudio using git2r functions.
Every tutorial I find online relies on the command line or looks at cloning EXISTING repositories. I cannot find any that walk through the creation of a repo from a local r project.
Workflow so far looks like this:
...ANSWER
Answered 2019-Dec-02 at 16:14The error you're getting is because you haven't provided a location for git to push to.
I think you're looking for the remotes
command - https://www.rdocumentation.org/packages/git2r/versions/0.23.0/topics/remotes
You can supply a local folder path to this, it doesn't have to be a remote server.
QUESTION
I am trying to install devtools
in my RStudio. But I get tons of errors:
ANSWER
Answered 2017-Aug-31 at 13:54The error messages may be a bit confusing, because RStudio is asking you to install libcurl and openssl libraries for your Linux OS; for those you actually need Ubuntu packages instead of R packages.
Open a command line terminal, and type
QUESTION
I am trying to install two packages in R (3.3.2): devtools
and git2r
. They are depending on the existence of zlib
. This comes with macOS Sierra (10.12.3) and it's version 1.2.8 by default.
When I'm trying to install these packages I get the error below.
I've been trying a lot of things.
- directly installing via CRAN in RStudio: no effect.
- trying to locate
zlib
on macOS: can't findzlib
. - installing via
R CMD INSTALL git2r
: no effect.
I notice someone has a similar issue posted on GitHub: https://github.com/ropensci/git2r/issues. There is no solution yet.
Does anyone here have an idea?
Thanks!
Sander
ERROR MESSAGE BELOW
configure error in "/private/tmp/RtmpP6HZFx/R.INSTALLe73412909267/git2r"
configure error
The zlib library that is required to build git2r was not found.
Please install:
zlib1g-dev (package on e.g. Debian and Ubuntu)
zlib-devel (package on e.g. Fedora, CentOS and RHEL)
and try again.
If the zlib library is installed on your system but the git2r configuration is unable to find it, you can specify the include and lib path to zlib with:
"R CMD INSTALL --configure-args='--with-zlib-include=INCLUDE_PATH --with-zlib-lib=LIB_PATH' git2r"
See "config.log" for more details
ERROR: configuration failed for package "git2r"
*removing "/usr/local/lib/R/3.3/site-library/git2r"
UPDATE: the same issue persists on macOS X 10.12.5 in combination with R 3.4.0 - the latter I need for DESeq2
.
ANSWER
Answered 2019-May-01 at 21:32Solution...Mmm. Not really. I simply uninstalled R and all the packages, and than I reinstalled everything again. I installed R
and RStudio
via homebrew
, following the instructions here: https://rud.is/b/2015/10/22/installing-r-on-os-x-100-homebrew-edition/.
Oddly enough: all issues disappeared.
UPDATE #1: this solution does not - obviously - work for the combination R 3.4.0 and macOS X 10.12.5. We need a solution for this issue.
UPDATE #2: I have discovered what I believe was the issue: a wrong path to the xcode command line tools.
sudo xcode-select --reset
did the trick and now xcode-select -p
points to /Library/Developer/CommandLineTools
. And which xcode-select
points to /usr/bin/xcode-select
. Googling I discovered that it is not needed to install Xcode through the App Store as it states on http://railsapps.github.io/xcode-command-line-tools.html:
"On earlier versions of macOS, it was more difficult to install Xcode Command Line Tools. It required a huge download of the full Xcode package from the Mac App Store or registration as an Apple developer for a smaller Command Line Tools package. Mac OS X Mavericks made installation of Xcode Command Line Tools much simpler.".
QUESTION
I am trying to install packages (devtools
, plyr
and several others) and keep getting stuck with the same problem, which seems to appear for some packages more often than others
ANSWER
Answered 2019-Jun-07 at 17:29For packages where it says needs compilation : TRUE you would need RTools if you hit "n" on the dialog box.
RTools usually are installed in the C: Drive on Windows.
This question is similar to yours.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install git2r
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page