2

When I try to create a new project in R studio by cloning a repository as follows:

File >> New Project >> Version Control >> Git >> ..enter Repository URL

I get the following error message

Cloning into 'simple-repository'... fatal: unable to access 'https://github.com/kedemd/simple-repository/': SSL certificate problem: self signed certificate in certificate chain

Any idea why I get this/ how to fix it?

I am using R 4.2, RStudio 1.1, and Windows

ColinTea
  • 998
  • 1
  • 9
  • 15
  • Are you behind a proxy at work/school? That error is indicative of either hitting an intermediary like that. – hrbrmstr Oct 17 '17 at 18:01
  • Yes behind a proxy a work. Do you know of any way around this without changing anything involving the proxy? – ColinTea Oct 17 '17 at 18:07
  • If you can install GitHub Desktop then I believe it honors proxy configurations. There's also potentially this https://stackoverflow.com/questions/128035/how-do-i-pull-from-a-git-repository-through-an-http-proxy – hrbrmstr Oct 17 '17 at 18:43

1 Answers1

1

You have to configure git to trust your corporate self-signed certificate.

The way to do it is explained in this answer. In substance:

1) Get the certificate:

openssl s_client -connect repos.sample.com:443

Catch the output into a file cert.pem and delete all but part between (and including) -BEGIN CERTIFICATE- and -END CERTIFICATE-

2) Configure git to trust this certificate

git config --global http.sslCAInfo /path/to/cert.pem

Read the original answer for full details.

Ortomala Lokni
  • 56,620
  • 24
  • 188
  • 240