4

I'm trying to figure out why, since this morning, bitbake is complaining during the fetch of

# Workaround to self signed certificate error
FETCHCMD_git = "GIT_SSL_NO_VERIFY=1 git -c core.fsyncobjectfiles=0"

SRC_URI = " \ 
    git://git-host.com/gitlab/my_repo.git;protocol=https;user=user:pwd;tag=v1.0.0 \
"

do_fetch fails with the following error

failed with exit code 128, output:
fatal: Refusing to fetch into current branch refs/heads/master of non-bare repository

Just after the execution of this command

LANG=C GIT_SSL_NO_VERIFY=1 git -c core.fsyncobjectfiles=0 fetch -f --prune --progress https://user:pwd@git-host.com/my_repo.git refs/*:refs/*

While the output of git ls-remote is

a570d6c827a45380820bf54d501502ec5b3e19c4    HEAD
8952f4ed30ccc688ac2b37e977118cec78501d47    refs/heads/baz
a570d6c827a45380820bf54d501502ec5b3e19c4    refs/heads/developer
a570d6c827a45380820bf54d501502ec5b3e19c4    refs/heads/master
89eae98fd33540d04880bb7a084ce864f2d229d3    refs/heads/foo
6f4b37e50b79435dd94a26912959b7e178f7f779    refs/heads/bar
2fb16625aff7744510e57dc0a0b0ad3645385308    refs/tags/v1.0.0
8952f4ed30ccc688ac2b37e977118cec78501d47    refs/tags/v1.0.0^{}

I've tried every (I think) SRC_URI option like

  1. bareclone=1
  2. nobranch=1
  3. branch=master and SRCREV=v1.0.0 but without any luck.

I've also read carefully this related so question.

Could someone help me figure out what is going on?


UPDATE

The problem disappeared after restarting the PC. I think that it was related to some cache not being cleared. Before restarting the PC, I've run bitbake myrecipe -c cleanall and cleansstate several times without any luck. I also checked that the directory set as $HOME in the log.do_fetch (that was a directory under /tmp) was being removed correctly.

garlix
  • 576
  • 9
  • 26
  • This blows my mind! I just restarted my PC and now the `do_fetch` routine completes flawlessly. This was also reported here https://stackoverflow.com/questions/39104055/fetching-into-non-bare-repository-with-bitbake#comment65735303_39149982 . And now I'm blaming myself to not have tried this before. But the question remains... – garlix Sep 05 '18 at 11:34

0 Answers0