0

I am trying to clone a repository and changed the https for SSH and the same error.

PS C:\Git_e_GitHub\1_primeiro_repo> git clone https://github.com/....../......git
Cloning into 'curso_git_1'...
fatal: unable to access 'https://github.com/......../...........git/': SSL certificate problem: unable to get local issuer certificate

PS C:\Git_e_GitHub\1_primeiro_repo> git clone git@github.com:......./.........git
Cloning into 'curso_git_1'...
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.

Please help me

Markus Meyer
  • 3,327
  • 10
  • 22
  • 35
  • 1
    have you tried: https://stackoverflow.com/questions/13509293/git-fatal-could-not-read-from-remote-repository ? – Matth B Jun 08 '22 at 09:19

2 Answers2

0

I was talking to a friend whos has the same problem and he told do try this command:

git config --global http.sslbackend schannel

And then:

git clone https://github.com/fbergami57/*********.git

It worked

Thanks everybody for the helping

0

The git config --global http.sslbackend schannel would work on Windows because, as explained in Git 2.20 (Q4 2018), on platforms with recent cURL library, http.sslBackend configuration variable can be used to choose a different SSL backend at runtime.

The Windows port uses this mechanism to switch between OpenSSL and Secure Channel while talking over the HTTPS protocol.

I detailed it in "Switch to "Native Windows Secure Channel library" from "OpenSSL library" on Windows Git, without reinstalling?"

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250