Handshake error in repo sync for oe-core

I was trying to build linux image for apalis imx8, as
mentioned in following link

But facing a handshake error when performing
repo sync.

Please suggest a solution.

~/oe-core$ repo sync
Fetching: 69% (9/13) meta-freescale-distro.git
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed

meta-yocto:
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed
meta-yocto: sleeping 4.0 seconds before retrying
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed

meta-yocto:
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed
error: Cannot fetch meta-yocto from https://git.yoctoproject.org/git/meta-yocto
Fetching: 100% (13/13), done in 6.229s
Garbage collecting: 100% (13/13), done in 0.018s

fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed

meta-yocto:
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed
meta-yocto: sleeping 4.0 seconds before retrying
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed

meta-yocto:
fatal: unable to access 'https://git.yoctoproject.org/git/meta-yocto/': gnutls_handshake() failed: Handshake failed
error: Cannot fetch meta-yocto from https://git.yoctoproject.org/git/meta-yocto
Fetching: 100% (1/1), done in 4.729s
Garbage collecting: 100% (1/1), done in 0.002s

error: Unable to fully sync the tree.
error: Downloading network changes failed.
Try re-running with "-j1 --fail-fast" to exit at the first error.
aneesh@aneesh-VirtualBox:~/oe-core$ ^C
aneesh@aneesh-VirtualBox:~/oe-core$ 

What was you “repo init” full string and what it spewed?

I had that error too. I solved by doing the :
Repo uses Git . Make sure you have it installed and your user name and e-mail address configured. Below is an example for Debian-based systems:
$ sudo apt install git
$ git config --global user.name “John Doe”
$ git config --global user.email johndoe@example.com

After I configured my user name and e-mail, I was able to sync again.
For good measure I would remove the /oe-core and the bin directories. Start from scratch
To save some hassle chmod -R 777 oe-core. before removing. that way it won’t complain that files a read only.

hope this helps

repo init -u https://git.toradex.com/toradex-manifest.git -b dunfell-5.x.y -m tdxref/default.xml

This is the repo init used

Thanks for suggestion jeffbelz, but it seems this solution is not fixing it for me

Hi @knaneesh !

I just tested the same commands as you and it worked for me (expand the “repo test” at the end of this message)

Are you still facing your issue?

Maybe you are not using an environment supported by Yocto project?

Please read our Introduction section of this Build a Reference Image with Yocto Project/OpenEmbedded | Toradex Developer Center article and the Yocto Project | Toradex Developer Center article. There are links other resources that will guide you on how to get started.

repo test
$ repo init -u https://git.toradex.com/toradex-manifest.git -b dunfell-5.x.y -m tdxref/default.xml
Downloading Repo source from https://gerrit.googlesource.com/git-repo

... A new version of repo (2.17) is available.
... You should upgrade soon:
    cp /home/user/apagar-oe-core-test/.repo/repo/repo /home/user/bin/repo

Downloading manifest from https://git.toradex.com/toradex-manifest.git

Your identity is: my-user-here <my-user-here@my-email.com>
If you want to change this, please re-run 'repo init' with --config-name

repo has been initialized in /home/user/apagar-oe-core-test

 $ ls -la
total 20
drwxrwxr-x   3 user user  4096 jan  4 10:12 .
drwxr-xr-x 115 user user 12288 jan  4 10:14 ..
drwxrwxr-x   5 user user  4096 jan  4 10:13 .repo

 $ repo sync

... A new version of repo (2.17) is available.
... You should upgrade soon:
    cp /home/user/apagar-oe-core-test/.repo/repo/repo /home/user/bin/repo

Fetching: 38% (5/13) meta-openembedded.git
Fetching: 100% (13/13), done in 6m11.371s
Garbage collecting: 100% (13/13), done in 0.056s
Checking out: 100% (13/13), done in 0.511s
repo sync has finished successfully.

$ ls -la
total 28
drwxrwxr-x   4 user user  4096 jan  4 10:20 .
drwxr-xr-x 115 user user 12288 jan  4 10:24 ..
-r--r--r--   1 user user  1304 jan  4 10:20 export
drwxrwxr-x  14 user user  4096 jan  4 10:20 layers
drwxrwxr-x   7 user user  4096 jan  4 10:20 .repo

Best regards,