Home > Enterprise >  Unable to fetch repositories using Yocto
Unable to fetch repositories using Yocto

Time:11-22

I am trying to build a Yocto image but it keeps failing on trying to fetch the GIT repositories as below. I can reach https://github.com/PROJECT/linux-imx from a browser, but no joy fetching the GIT repository from Yocto. Any ideas on how to solve it would be appreciated.

 WARNING: linux-imx-5.4-r0 do_fetch: Failed to fetch URL git://github.com/PROJECT/linux-imx.git;protocol=https;branch=master

CodePudding user response:

Missing SRC_URI checksum

CodePudding user response:

When you want to have a git source then you need to use git but you need to specify the protocol as well.

Format: git://URL;protocol=PROTOCOL;branch=BRANCH Also you need to specify the revision with SRCREV

For https protocol the repo needs to be public, if it is private then you need to save your git credentials to the system's git configuration.

For ssh protocol then you need to set up your public ssh key in your github account.

So, for your project, it would look like this:

SRC_URI = "git://github.com/PROJECT/linux-imx;protocol=https;branch=BRANCH"
SRCREV = "aaaa.."

or

SRC_URI = "git://github.com/PROJECT/linux-imx;protocol=ssh;branch=BRANCH"
SRCREV = "aaaa.."

It remains to set the branch and SRCREV

SRCREV is the commit hash that you want to fetch.

Regarding the problem you faced lately which is Missing SRC_URI checksum is that if you set the SRC_URI protocol to https instead of git like:

SRC_URI = "https://github.com/PROJECT/linux-imx"

then, bitbake will assume that linux-imx is a regular file to download, then it will look for SRC_URI checksum to verify the integrity of the file which in your case don't needed.

  • Related