Skip to content

[Bug]: SSH_AUTH_SOCK is possibly not being passed to Dagger sessions #272

@terpasaurus-midwest

Description

@terpasaurus-midwest

What happened?

When working with an AI agent on a local Git repo that has a submodule pointing to a remote repository that requires SSH authentication, the resulting Dagger session does not have access to the host's SSH socket.

It appears here is where Dagger is invoked during the above, and I think during the Tree() call is when something tries to initialized the submodules. During this process the ssh agent socket at SSH_AUTH_SOCK on the host has the required key loaded. But the environment creation fails when git tries to do an SSH call to the remote and can't find any credentials.

Originally, I thought the issue was on Dagger's side, but after opening an issue there, I don't think that's the case. I can't find anywhere container-use code accesses the host's SSH_AUTH_SOCK environment variable or configures the Dagger session to use it when it invokes Dagger.

This may be related to #161 but the specifics of our reports are quite different, so I felt it worth posting. I'm willing to dig into the code more and contribute an MR or help get an existing one to the finish line if that existing submodules branch is still valid and worth forking.

Version

container-use version 0.4.1
commit: 71346865565c2a0d9dd92350ed30c86ed73e43b9
built: 2025-08-01T18:32:52Z

Logs


Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions