r-lib / gert

Simple git client for R
https://docs.ropensci.org/gert/
Other
148 stars 32 forks source link

use_git() doesn't work #134

Closed IanniMuliterno closed 3 years ago

IanniMuliterno commented 3 years ago

I just started a project, then I tried to run usethis::use_git() and received the following :

> usethis::use_git()
√ Adding '.Rproj.user', '.Rhistory', '.Rdata', '.httr-oauth', '.DS_Store' to '.gitignore'
Error in libgit2::git_repository_open_ext : 
  failed to stat 'C:\Users\Iann<ed>/.gitconfig'
jennybc commented 3 years ago

use_git() works for thousand of people, so I think we should assume there is something challenging about your setup and I'm guessing it's your username. Does it perhaps have a non-ascii character in it?

This is almost certainly going to be an issue for gert (or maybe even libgit2).

jeroen commented 3 years ago

@IanniMuliterno could you maybe test if this problem also exists with R 4.1 (aka R-devel): https://cran.r-project.org/bin/windows/base/rdevel.html

jeroen commented 3 years ago

@IanniMuliterno I have fixed this particular issue, but there are likely more problems with non-ascii usernames. I'll try to track these down, but you can make your life much easier by using a Windows username without diacritics 😄

jeroen commented 3 years ago

Small followup, did some more fixes, in particular to convert all paths to utf-8, which is what libgit2 expects: https://github.com/r-lib/gert/commit/ad1e7d402f5bd98d56b2e91522693dd2d7094127

I think now everything should work for non-ascii users 😅

IanniMuliterno commented 3 years ago

Sorry for the delay everyone. @jeroen thank you very much!!!

IanniMuliterno commented 3 years ago

@jennybc yes, my username was an issue ahaha, In my experience special characters can be a headache to programmers who use windows