Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Git Auth Problem #1

Open
jkalatchev7 opened this issue Apr 9, 2022 · 10 comments
Open

Git Auth Problem #1

jkalatchev7 opened this issue Apr 9, 2022 · 10 comments

Comments

@jkalatchev7
Copy link

I recently had to change some configurations in my KubOS kernel and in the process of building it, I got ERROR 404: NOT FOUND when buidroot tried to compile and build kubos-1.20.0.tar.gz

It also threw a warning saying:
The unauthenticated git protocol running on port 9418 is no longer supported

I struggle for a while with this but it turns out it was due to the fact that buildroot on my VM was using git:// rather than https://
Issuing the following command seems to have fixed the issue but I imagine there is a better way to update this repo to prevent similar problems...

git config --global url."https://".insteadOf git://

@MoralCode
Copy link
Member

Ah yes, it seems like git has changed their url schemes for git urls in the name of security

https://github.blog/2021-09-01-improving-git-protocol-security-github/

Other members of the discord have also had success authenticating over an ssh url ([email protected]:kubos/kubos.git) but that requires some setup if you havent used ssh auth before, so id agree that https is a better way to go.

Im not sure when ill have time to fix this, but ill review a pull request if you have time to make one

@patrickoppel
Copy link

The ssh authentication didn't work in the end on my side. (At least changing it in the kubos.mk).

I'm keen to find out why git config --global url."https://.insteadOf git:// works, but substituting the hardcoded link containing the git:// doesn't

@MoralCode
Copy link
Member

AFAIK the git config --global url."https://".insteadOf git:// will swap out the url on the fly. Maybe your previous attempt was still cached somehow by buildroot and so maybe there was a local repo that still had a remote repo configured with a different URL?

@patrickoppel
Copy link

Yeah probably, although the call changes to https:// when modified in the code, thus my confusion.

But I also saw buildroot loads multiple other dependencies with git:// calls. I'm planning to try out buildroot-2022.02.1 tomorrow, which should not use those git:// dependencies anymore

@MoralCode
Copy link
Member

I'm planning to try out buildroot-2022.02.1 tomorrow, which should not use those git:// dependencies anymore

isnt that part of the kubos config and not buildroot itself? either way, it would be awesome to know how it goes with the new buildroot. i think i tried to use a newer-than-2019 one at some point and i guess some of the flags got deprecated and i didnt know what i was doing and sorta gave up

@patrickoppel
Copy link

Partly, but according to the buildroot changelog, they only got rid of git:// dependencies with the 2022.02.1 version. So there's heaps of other links buildroot 2019 tries to call during the build process, that won't work unless you do git config --global url."https://".insteadOf git://

@ravisha2396
Copy link

ravisha2396 commented May 23, 2022

Buildroot uses wget on https addresses and this is probably why manually renaming git:// to https:// in kubos.mk is not able to locate the git branch. So you may want to use the git command git config --global url."https://".insteadOf git:// to tell BR to identify it as a github branch rather than a download URL. Below ref is from the BR manual:

Source fetching tools:

In the official tree, most of the package sources are retrieved using wget from ftp, http or https locations. A few packages are only available through a version control system. Moreover, Buildroot is capable of downloading sources via other tools, like rsync or scp (refer to (https://buildroot.org/downloads/manual/manual.html#requirement) for more details).

@MoralCode
Copy link
Member

wow that actually makes a ton of sense for why this is the behavior that there is.

Based on my limited experience with buildroot, I feel like I remember seeing some kind of flag or other variable to explicitly tell buildroot that this is a git repository, overriding the default handling for this url so we can make it https:// permanently and have buildroot still treat it as a git url (passing it to git) instead of assuming wget.

unfortunately the "refer to chapter 20" part of the docs that you linked appear to simply say TODO :/

@patrickoppel
Copy link

These chapters might be relevant:
Github Download
Generic Package Reference

@MoralCode
Copy link
Member

ah it looks like the variable that may be useful is LIBFOO_SITE_METHOD (presumably replacing the name LIBFOO with whatever matches the place the git url is currently set. Would be interesting to see what this does with a value of git and a url that doesnt start with git:// per the instructions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants