fredldotme / git-confined-snap

A Snap of Git for confined environments
2 stars 1 forks source link

unable to sign with gpg #5

Open Fuseteam opened 1 month ago

Fuseteam commented 1 month ago

when i try to sign my commits i get this: image

but when i try it witht he snap in devmode i don't

not sure what's up but i suspect we're missing gpg-agent in the snap, not sure how to test it tho ah i need to install without the --devmode flag

fredldotme commented 1 month ago

Sure the GPG interfaces are connected?

Fuseteam commented 1 month ago

yes they are both connected (and no including gpg-agent in the snap didn't help) image

fredldotme commented 1 month ago

I'd suggest playing with the env var GPG_AGENT_INFO and pointing it to the socket path available within the Snap's file system view.

Fuseteam commented 1 month ago

hmmm i'll have to figure out how to do that first haha, is this with or without the agent included?

I guess i start by poking around for socket path

fredldotme commented 1 month ago

Without. Also helpful: snap run --shell git-confined.git

Fuseteam commented 1 month ago

huh poking around in snap run --shell git-confined i do not see gpg at all in /usr/bin :thinking:

snap run --shell git-confined.git says no app git found in git-confined strangely enough xd

fredldotme commented 1 month ago

Stop focusing on a host component not being shipped in the snap, the interface between snap-side gpg and host-side gpg-agent is the socket.

Fuseteam commented 1 month ago

i'm not looking for gpg-agent fwiw i know it's not in there

fredldotme commented 1 month ago

Look in $SNAP/usr/bin, don't forget relocation of the binaries.

Fuseteam commented 1 month ago

thanks, starting to make more sense now, meanwhile i've found there's more to it then meets they eye: https://github.com/canonical/snapd/pull/7693 access to the socket seems forbidden.

tho the pull request does mention an successful integration, i'll try to mimick that