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

Git issues: multiple remote, exit status: 128 and completion #17

Open
Pantamis opened this issue Jan 26, 2023 · 1 comment
Open

Git issues: multiple remote, exit status: 128 and completion #17

Pantamis opened this issue Jan 26, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Pantamis
Copy link

Hi !

I am always following your great project !

The problem I had with git was that I used keygrip instead of long ID in .gpg-id file, prs seems to not be able to handle them. Manually replacing keygrip with key ID allows prs to recognize recipients. Great 👍

Now I still have some issues:

  1. I use multiple remote with custom name. It seems prs can't handle them:

prs sync remote
error: multiple remotes configured, cannot decide automatically

What should I do ?

  1. Even if now git recognizes the recipient, it seems I mostly can't use it
    For exemple, when I want to edit a secret using prs edit [secret_path] --verbose it returns me:

error: git operation exited with non-zero status code: exit status: 128

If I have uncommited change, the previous command is able to warn me about it and stop. I have no issue to decrypt a file with gpg with prs show. Also, my ssh key are stored with gpg too so I always have to set gpg agent using export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) before doing any git related stuff. Maybe it is not supported by prs ?

  1. Bash completion not working as expected

I did prs internal completion bash this allows me to complete using tabs but it only propose me the file in the current folder. I have to cd into password-store directory to be able to complete with secrets' names.

Thanks for your time :)

@timvisee
Copy link
Owner

timvisee commented Feb 2, 2023

I am always following your great project !

Awesome! 😇

  1. I use multiple remote with custom name. It seems prs can't handle them:

Could you elaborate on how you use this? That would help me understand how this can be properly implemented. Do you always push to all your remotes for example?

For basic synchronization prs assumes you have a single remote that it can push to. With multiple remotes things get complicated on whether prs should push to it or not.

I can minimize errors here, for example, to just use the tracked remote for the current branch (git config branch.master.remote), but this is limited.

Please note that prs sync remote [URL] just gets and sets the primary remote. If this errors, you may resolve this manually with prs git remote instead.

I've added an issue for some improvements on this here.

2. Even if now git recognizes the recipient, it seems I mostly can't use it
For exemple, when I want to edit a secret using prs edit [secret_path] --verbose it returns me:

I'm not sure what you mean by this. Could this be related to a GPG key that is used for signing commits, that isn't found or unlocked?

Does running prs sync give you the same error?

This issue works on improving git's output in --verbose mode.

Also, my ssh key are stored with gpg too so I always have to set gpg agent using export SSH_AUTH_SOCK=$(gpgconf --list-dirs agent-ssh-socket) before doing any git related stuff. Maybe it is not supported by prs ?

Yes, exported environment variables are used by git. prs simply uses the git binary, so there's no real magic here.

3. Bash completion not working as expected

Fixed in ac55961.

That's weird! This was implemented by #12 as shown here: https://github.com/timvisee/prs/pull/12/files

I've added an issue to re-implement this here.


Thank you for these reports. These are super useful!

@timvisee timvisee self-assigned this Feb 2, 2023
@timvisee timvisee added the bug Something isn't working label Feb 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants