lib/bb/fetch2/git.py: added handling of password#16
lib/bb/fetch2/git.py: added handling of password#16SvOlli wants to merge 1 commit intoopenembedded:masterfrom
Conversation
Trying to checkout sourcecode which is username/password protected fails. This is a fix that also hands down the password to the downloader.
|
This patch seems interesting but you should read README to see how contributing, Pull Request are never read and cannot be disable on github. |
|
I just stumbled over this PR and wanted to let other users know, that bitbake can make use of the git-credentials. Simplify put your credentials into a file (i.e. and configure git (and bitbake) to use it: git config --global credential.helper "store --file $PWD/.git-credentials" |
|
@leiflm I stumbled here trying to figure out why bitbake's git fetcher is not only failing to authenticate to my private, token-based bitbucket URI, but is deleting my .git-credentials file! I'm running bitbake in a container, that worked great until I set SRCREV to AUTOREV, and using the .git-credentials file works correctly in every manual use case (cloning in host and in container shell) except the bitbake fetcher in the AUTOREV case (which fails early trying to ls-remote to see if a new Rev needs to be pulled). I have cleaned sstate for the recipe in question (kernel bbappend using my kernel fork), and this problem persists. Ive also tried putting the creds in a .netrc in the container to no avail, so I'm thinking it's something specific to the fetcher use case when SRCREV=AUTOREV. I haven't been able to debug the git.py code beyond confirming that the .git-credentials file exists before making the Any ideas? |
|
Using GIT_TRACE=1 to compare ..followed by successful output. But in the failed case, with bb fetcher running, it is the same except it does not progress from |
|
Was finally able to reproduce this outside bitbake, using the oe environment's version of git (the one bb was using, 2.44.0), and will go digging in git repo/issues for root cause. Cranking up the verbosity in my ls-remote "invalid credentials" case, I can see:
So, the main question I will ask the git devs is why the EDIT: I have confirmed that git 2.44.0 (running on termux aarch64) does NOT exhibit this misbehavior. |
I had problems in yocto trying to download a password protected git repository hosted via http.
Tracking down the problem, I noticed that the git fetcher of bitbake only handles the password, but drops the password. This is the change that fixed the problem for me. I hope it will be of use for others as well.