-
Notifications
You must be signed in to change notification settings - Fork 154
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
KAS checkout not working in vscode devcontainer #101
Comments
The Your case (which no one requested so far) is more comparable to |
Hi Jan, tnx for your reply. I would not know how to use GIT_CREDENTIAL_HELPER to support the devcontainer scenario. The git credential helper inside the container needs the environment variable REMOTE_CONTAINERS_IPC in order to work. Hence this variable needs to be whitelisted. I think it falls into the same category as SSH_AUTH_SOCK. |
I suppose it still needs someone to dive deeper into this. I'm not the right candidate as I'm not using vscode. Maybe there are more chances when taking this to the mailing list. |
I just had the same problem. A few things are necessary for this to work:
env:
# for devcontainer
REMOTE_CONTAINERS_IPC: null The second part is bitbake's fetch2 cleaned env for git, which needs to contain This is only in master right now: https://git.yoctoproject.org/poky/commit/bitbake/lib/bb/fetch2/__init__.py?id=6cb490713ed So right now, we need to patch bitbake or wait for the next release. |
@okaestne We have a RFC for that patch on the kas ML for some time now. It would be great if someone could review and test it (ideally with the bitbake from master): https://groups.google.com/g/kas-devel/c/_eQsWitKflo/m/Q3ZhBkr7AQAJ |
I've just tested this patch on kas 4.5 and scarthgap. In my vscode devcontainer it copies the |
Ehm... The patch is not applied yet. I'm currently rewriting it to rebase and to add the missing documentation. Please keep this issue open until applied. |
When running inside a vscode devcontainer, git credential settings are injected using a modified .gitconfig file. In addition, the injected credential handler needs access to environment variables like REMOTE_CONTAINERS_IPC. As all this is rather undocumented territory, we first detect if we are running inside a remotecontainers environment and then forward all REMOTE_CONTAINERS_* variables. This should also enable the use of kas in the github codespaces (not tested). Xref: https://patchwork.yoctoproject.org/project/bitbake/patch/[email protected]/ Closes: siemens#101 Proposed-by: Matthias Schnelte <[email protected]> Signed-off-by: Felix Moessbauer <[email protected]>
@fmoessbauer You mention codespaces in your commit. I tested with one of these today as well and found out that they provide the git credentials using a dead-simple git credential helper, that just echoes the parameters, including the I would try to send a patch for bitbake first and a separate one for kas if it's been accepted, or what do you think? |
Well... I thought that this works the same way - but apparently I doesn't. I'll just remove this part of the commit message.
That sounds like a plan. Anyways, thanks for testing! |
When running inside a vscode devcontainer, git credential settings are injected using a modified .gitconfig file. In addition, the injected credential handler needs access to environment variables like REMOTE_CONTAINERS_IPC. As all this is rather undocumented territory, we first detect if we are running inside a remotecontainers environment and then forward all REMOTE_CONTAINERS_* variables. Xref: https://patchwork.yoctoproject.org/project/bitbake/patch/[email protected]/ Closes: siemens#101 Proposed-by: Matthias Schnelte <[email protected]> Signed-off-by: Felix Moessbauer <[email protected]>
When running inside a vscode devcontainer, git credential settings are injected using a modified .gitconfig file. In addition, the injected credential handler needs access to environment variables like REMOTE_CONTAINERS_IPC. As all this is rather undocumented territory, we first detect if we are running inside a remotecontainers environment and then forward all REMOTE_CONTAINERS_* variables. Xref: https://patchwork.yoctoproject.org/project/bitbake/patch/[email protected]/ Closes: siemens#101 Proposed-by: Matthias Schnelte <[email protected]> Signed-off-by: Felix Moessbauer <[email protected]>
When running inside a vscode devcontainer, git credential settings are injected using a modified .gitconfig file. In addition, the injected credential handler needs access to environment variables like REMOTE_CONTAINERS_IPC. As all this is rather undocumented territory, we first detect if we are running inside a remotecontainers environment and then forward all REMOTE_CONTAINERS_* variables. Xref: https://patchwork.yoctoproject.org/project/bitbake/patch/[email protected]/ Closes: #101 Proposed-by: Matthias Schnelte <[email protected]> Signed-off-by: Felix Moessbauer <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
When running inside a vscode devcontainer, git credential settings are injected using a modified .gitconfig file. In addition, the injected credential handler needs access to environment variables like REMOTE_CONTAINERS_IPC. As all this is rather undocumented territory, we first detect if we are running inside a remotecontainers environment and then forward all REMOTE_CONTAINERS_* variables. Xref: https://patchwork.yoctoproject.org/project/bitbake/patch/[email protected]/ Closes: siemens#101 Proposed-by: Matthias Schnelte <[email protected]> Signed-off-by: Felix Moessbauer <[email protected]> Signed-off-by: Jan Kiszka <[email protected]>
kas checkout is not working in vscode devcontainers because the needed environment variable
REMOTE_CONTAINERS_IPC
is not available to the git process.
The checkout fails with "Dev Containers CLI: RPC pipe not configured."
It seems that the env section of the yml file is not parsed during checkout.
Hence adding REMOTE_CONTAINERS_IPC to this section is not sufficient.
Changing the kas/context.py line 109 to:
solved that issue for me.
However would it not be better to parse the env section of the yml file already before checkout?
The text was updated successfully, but these errors were encountered: