I tried to create a git repo with the instructions from ""
but I get the following error when trying to initialize the repo in the working directory (using Ubuntu):
:~/workdir$ repo init -u
fatal: Cannot get
fatal: error [Errno -2] Name or service not known
I have created the ~/.netrc file with generated password and also set the HTTP_PROXY and HTTPS_PROXY variables.
When I try to access the above clone.bundle link through a browser, I get "not found" error.
Please let me know if some additional settings need to be done. Thanks in advance.
6 Answers
error
fatal: Cannot get
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:590)you can modify this repo file for this issue, please follow the below commands
sudo cp /usr/bin/repo /usr/bin/repo_bak
sudo vi /usr/bin/repoinsert the below detail after 'import sys'
import ssl
ssl._create_default_https_context = ssl._create_unverified_contextthen save this file, and retry again
0i am a MAC user (Mojave). I have the same error.
When i launch:
repo init <repository url>I get this error:
Downloading Repo source from
fatal: Cannot get
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:852)
fatal: cloning the git-repo repository failed, will remove '.repo/repo'The problem seems due to Python 3.6 on MacOS that comes with its own private copy of OpenSSL. That means the trust certificates in the system are no longer used as defaults by the Python ssl module. To fix that, you need to install a certifi package in your system.
i have solved with:
open /Applications/Python\ 3.6/Install\ Certificates.command I suppose the issue will be solved by installing openssl and ca-certificates packages.
1FYI: here how I solved it:
The second line of my error was different:
fatal: Cannot get
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed (_ssl.c:581)But the remark in the question above worked for me (download clone.bundle, and use the --repo-url option).
It gave however errors in the python code in .repo/.
But I ignored that, and the repo sync command succeeded.
might require to rebuild/reinstall python with libssl-dev installed before
I had a somewhat similiar issue but I was able to download in my browser, so once I did that I could use the undocumented repo parameter from this answer: like so:
repo init -u --repo-url <location-where-you-downloaded-clone.bundle> 1