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

Cant sync: ControlPath too long for Unix domain socket #1896

Closed
faaaaabi opened this issue Apr 3, 2021 · 7 comments · Fixed by #1899 or #1951
Closed

Cant sync: ControlPath too long for Unix domain socket #1896

faaaaabi opened this issue Apr 3, 2021 · 7 comments · Fixed by #1899 or #1951
Assignees
Labels
bug Defects
Milestone

Comments

@faaaaabi
Copy link

faaaaabi commented Apr 3, 2021

Summary

I can't sync a store with git repository under a second user on my machine. Getting the following error:

🚥 Syncing with all remotes ...
[<root>]
   git pull and push ... Skipped (no remote)
[someStore]
Enter passphrase for key '/Users/someUser/.ssh/id_rsa':
Enter passphrase for key '/Users/someUser/.ssh/id_rsa':
⚠ Failed to pull before git push: exit status 1: unix_listener: path "/var/folders/wt/16xf0rj51md2fcw_2737y31h0000gs/T//.gopass-ssh-someUser-git@gitlab.someDomain.tld:22.OakPCGixcoTJoKYc" too long for Unix domain socket
fatal: Konnte nicht vom Remote-Repository lesen.

Bitte stellen Sie sicher, dass die korrekten Zugriffsberechtigungen bestehen
und das Repository existiert.

This is true for all stores with remote i setup.

I also tried to set the ControlPath manually in my ssh config as the error states that the ControlPath is to long

❯ cat .ssh/config
Host *
  ControlPath ~/.ssh/control/%C
  ControlMaster auto

But this has no effects

Steps To Reproduce

I don't know how to reproduce, as it is working for another user on the same machine. Setup steps were similar.

Expected behavior

gopass should sync with remote without any errors as with the other user on the same machine

Environment

  • OS: macOS -big Sur 11.2.1
  • OS version: 20.3.0 Darwin Kernel Version 20.3.0: Thu Jan 21 00:06:51 PST 2021; root:xnu-7195.81.3~1/RELEASE_ARM64_T8101 arm64
  • gopass Version: 1.12.5 (2021-03-27 22:20:52) go1.16.2 darwin arm64
  • Installation method: brew (ARM)

Additional context

@dominikschulz dominikschulz self-assigned this Apr 5, 2021
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Apr 5, 2021
Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Fix SSH control path

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@dominikschulz dominikschulz added this to the 1.12.6 milestone Apr 5, 2021
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Apr 5, 2021
Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Fix SSH control path

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
dominikschulz added a commit that referenced this issue Apr 5, 2021
Fixes #1896

RELEASE_NOTES=[BUGFIX] Fix SSH control path

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@dominikschulz
Copy link
Member

Once 1.12.6 is out you should be able to fix this by running gopass fsck.
Right now you should be able to work around the issue by setting TMPDIR to /tmp.

@dominikschulz dominikschulz added the bug Defects label Apr 5, 2021
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Apr 5, 2021
Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Fix SSH control path

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
@yohannes
Copy link

yohannes commented May 16, 2021

Hi @dominikschulz I am still facing the same issue on gopass 1.12.6 (2021-05-01 18:43:35) go1.16.3 darwin amd64 on MacOS 11.3.1. I was setting up gopass for the first time.

Per your comment above, running gopass fsck produced the following log:

[] ⚠ Failed to pull before git push: exit status 1: unix_listener: path "/var/folders/kx/3dgbmvjx14n9nk7f6w0px7l80000gn/T//.ssh-951974854c3a42896dc93d9e52eb6dc9dbfa3ddc.4SOHYp2UbkSVd1pB" too long for Unix domain socket
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

The sshCommand variable in the .git config file has the following value:
sshCommand = ssh -oControlMaster=auto -oControlPersist=600 -oControlPath=/var/folders/kx/3dgbmvjx14n9nk7f6w0px7l80000gn/T//.ssh-%C

fyi, I can clone the remote private repo on my github without a problem.

Any pointer will greatly appreciated.

@Eric-Dunaway
Copy link

@yohannes if you remove the sshCommand variable from the .git/config it should work

@yohannes
Copy link

yohannes commented Jun 3, 2021

Thanks @Eric-Dunaway. I'm still facing the same issue after removing the key-value pair suggested.

Update: the key-value pair above is auto-generated again after deletion

@tomkel
Copy link

tomkel commented Jun 3, 2021

I also have this issue on gopass 1.12.6 and macOS 11.4 . The issue appears after running gopass fsck. It is resolved by removing the sshCommand = ssh -oControlMaster=auto -oControlPersist=600 -oControlPath=/var/folders/s_/rpxsrzls7m15s_kytw248gqh0000gn/T//.ssh-%C from .git/config. However next time I run gopass fsck, the sshCommand is re-inserted causes problem again.

@Paktosan
Copy link

Can we please reopen this? It is still an issue with 1.12.6.

@AnomalRoil AnomalRoil reopened this Jun 28, 2021
@dominikschulz
Copy link
Member

Hmm, this is slightly annoying. Maybe we shouldn't set sshCommand on MacOS until we've found a proper way to deal with this.

@dominikschulz dominikschulz modified the milestones: 1.12.6, 1.12.7 Jul 1, 2021
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jul 1, 2021
Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Use /tmp for GIT_SSH_COMMAND on Mac

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
dominikschulz added a commit to dominikschulz/gopass that referenced this issue Jul 1, 2021
Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Use /tmp for GIT_SSH_COMMAND on Mac

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
dominikschulz added a commit that referenced this issue Jul 1, 2021
…1951)

Fixes #1896

RELEASE_NOTES=[BUGFIX] Use /tmp for GIT_SSH_COMMAND on Mac

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
kpitt pushed a commit to kpitt/gopass that referenced this issue Jul 21, 2022
Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Fix SSH control path

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
kpitt pushed a commit to kpitt/gopass that referenced this issue Jul 21, 2022
…opasspw#1951)

Fixes gopasspw#1896

RELEASE_NOTES=[BUGFIX] Use /tmp for GIT_SSH_COMMAND on Mac

Signed-off-by: Dominik Schulz <dominik.schulz@gauner.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Defects
Projects
None yet
7 participants