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

gpg-agent #5

Closed
Yamakaky opened this issue Apr 1, 2014 · 36 comments
Closed

gpg-agent #5

Yamakaky opened this issue Apr 1, 2014 · 36 comments
Assignees
Milestone

Comments

@Yamakaky
Copy link

Yamakaky commented Apr 1, 2014

How does your plugin interact with gpg-agent ? My key is in the agent but the plugin says it isn't. I launch gpg-agent with systemd --user, my GPG_AGENT_INFO is ok (I exported the env variable).

@jvenant
Copy link
Collaborator

jvenant commented Apr 2, 2014

I load environment variables from the .gpg-agent-info file in the user home (can be change in the preferences)
But as said in the #8 issue, I don't support the environment variables directly yet.
I will fix that in the next release. It may fix your problem too.

@Yamakaky
Copy link
Author

Yamakaky commented Apr 2, 2014

I configured the setting to my actual env file (/run/user/1000/gpg-agent-info for me), but the plugin doesn't seem to be able to access it.

@jvenant
Copy link
Collaborator

jvenant commented Apr 3, 2014

Can you try using "/run/user/1000/" in User home
and "gpg-agent-info" in Gpg agent info file

@jvenant
Copy link
Collaborator

jvenant commented Apr 3, 2014

Forget it. I just checked the code. The Gpg agent info file preference is not used

@Yamakaky
Copy link
Author

Yamakaky commented Apr 3, 2014

Well, it may be a problem ^^

@jvenant jvenant added this to the v1-beta-3 milestone Apr 3, 2014
@jvenant jvenant self-assigned this Apr 3, 2014
jvenant added a commit that referenced this issue Apr 3, 2014
@jvenant
Copy link
Collaborator

jvenant commented Apr 3, 2014

@jvenant jvenant added the Done label Apr 3, 2014
@Yamakaky
Copy link
Author

Yamakaky commented Apr 3, 2014

Well, now the passwords list is empty, I can't see them at all ^^

@jvenant
Copy link
Collaborator

jvenant commented Apr 4, 2014

Oups ! Sorry about that. ^_^
Could you try to start Firefox with the console (firefox -jsconsole) and tell me if you see any thing about pass, page, browserOverlay or preferences files ?

@jvenant jvenant removed the Done label Apr 4, 2014
@Yamakaky
Copy link
Author

Yamakaky commented Apr 5, 2014

No, I can't see anything relevant...

@jvenant
Copy link
Collaborator

jvenant commented Apr 7, 2014

I added some log in the browser console in the last release
Could you try again using v1-beta-4
You can filter on "PassFF" to only see logs about PassFF
I should be able to retrieve more info. Especially environment info which I think is the origin of the problem.
The debug "Execute pass" log may also be interesting because it contains data used to execute pass

@Yamakaky
Copy link
Author

Yamakaky commented Apr 7, 2014

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

Everything looks ok...?
You say that you have no entries in the "All" submenu ?

@Yamakaky
Copy link
Author

Yamakaky commented Apr 8, 2014

Oups, I forgot to tell you, my second problem is resolved, I can see the "All" submenu, sorry. So many problems ! XD
The gpg-agent access problem is still here.

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

Ok, so could you check in the log that gpgAgentEnv array match your gpg_agent_info
You should be able to see it on the line juste bellow the "[PassFF] preferences initialised".
Could you also check the environment array of the "Execute pass" lines is ok

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

Sorry Yamakaky, I made a mistake in the last beta.
Try with v1-beta-5

@Yamakaky
Copy link
Author

Yamakaky commented Apr 8, 2014

It's correct (but SSH_* variables are empty). I didn't filled the file location setting, so the GPG_... comes from the env.

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

GPG_AGENT_INFO should be enough....
Are you sure your Firefox has enough privileges to access the GPG_AGENT_INFO socket ?
I can't see what's missing. It should work...

@Yamakaky
Copy link
Author

Yamakaky commented Apr 8, 2014

Yes, I have read-write access to the socket in /tmp/gpg-*/. Isn't it a beta problem ? I use firefox 29.

@Yamakaky
Copy link
Author

Yamakaky commented Apr 8, 2014

Strange : if I fill the gpg agent info file setting, the password list is empty... Does firefox restrict reading file in /run ? It works if I symlink the file to ~/gpg-agent-info

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

Maybe, it's a good suggestion. Other people doesn't seems to have the same issue.
Looks like I'm not going to like FF 29 ^_^.

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

I use an external module to launch pass : subprocess.
I'm going to update to the last version.... Who knows....

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

if the password list is empty, it looks like the issue in on my side.
Pass don't use gpg-agent to get the passwords repository tree. It's pure file system browsing.
You don't have any error in the log in this case ?

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

just release a new version to solve the issue about the gpg agent file
https://github.com/jvenant/passff/releases/tag/v1-beta-6

@Yamakaky
Copy link
Author

Yamakaky commented Apr 8, 2014

No...

@jvenant
Copy link
Collaborator

jvenant commented Apr 8, 2014

You still have an empty password list if you set the pg agent info file setting to /run ?

@Yamakaky
Copy link
Author

Yamakaky commented Apr 8, 2014

No, this bug is patched.

@jvenant
Copy link
Collaborator

jvenant commented Apr 9, 2014

No clue about this. I think it's something about your environment.
I use systemd too and I know it could be a little bit touchy. Especially concerning the user space.
Did you try launching gpg-agent using the old fashion way : manually or through a profile.d script ?

@jvenant jvenant added Done and removed Done labels Apr 9, 2014
@Yamakaky
Copy link
Author

Yamakaky commented Apr 9, 2014

Neither : through a systemd unit ^^
I tried, The env variable is OK everywhere else.

@jvenant jvenant added question and removed question labels Apr 11, 2014
@TobiasBales
Copy link

I got an issue regarding $GPG_AGENT_INFO
it seems like passff does not use it anymore.
My $GPG_AGENT_INFO is set correct, the preference field is empty but I am prompted for my password every time.
With an older release (not sure which, now I am on beta 11) it used to work fine.
Any ideas?

@jvenant
Copy link
Collaborator

jvenant commented Apr 16, 2014

Could you take a look in the log on a line like "[PassFF] pass script execution ok"
You should be able to see the environment variables used to execute pass on the params object.

@TobiasBales
Copy link

[13:13:50.567] "[PassFF]" "Try to retrieve Gpg agent variables from file /home/tobias/"
and then gpgAgentEnv is null
If I pass in a file that does not exist it falls back to $GPG_AGENT_INFO

jvenant added a commit that referenced this issue Apr 16, 2014
@jvenant jvenant added the bug label Apr 16, 2014
@jvenant
Copy link
Collaborator

jvenant commented Apr 16, 2014

I hope this issue is solved here : v1-beta-12

@jvenant jvenant added the Done label Apr 16, 2014
@TobiasBales
Copy link

Works fine now, thank you

@Yamakaky
Copy link
Author

Guys, it found it. In my gpg-agent.conf, I enabled only pinentry-curse. My bad.

@jvenant
Copy link
Collaborator

jvenant commented Apr 16, 2014

Yes! That's a really good news.
I'm going to be so happy to close this issue

@jvenant jvenant closed this as completed Apr 16, 2014
@Yamakaky
Copy link
Author

^^

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

No branches or pull requests

3 participants