fork-dev / Tracker

Bug and issue tracker for Fork for Mac
509 stars 12 forks source link

Support for git-remote-codecommit #1793

Open kuthair opened 1 year ago

kuthair commented 1 year ago

My company has switched over to use AWS git-remote-codecommit: https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-git-remote-codecommit.html

Any chance of getting support for git remote-helpers?

https://git-scm.com/docs/gitremote-helpers

Thanks for your consideration.

DanPristupov commented 1 year ago

Does it work in the command line? If yes, did you try to switch Fork to the system git instance?

kuthair commented 1 year ago

Yes, it works in the command line.

Yes, I've tried using the system git. Both instances give the same error:

image

DanPristupov commented 1 year ago

Looks like remote-codecommit not in PATH of the Fork process. Where is the file located and how did you configure git to use it?

  1. Try to start Fork from the command line using open -a Fork command. This will make Fork inherit ENV (and PATH) of the terminal process.
  2. Consider using absolute path to remote-codecommit in your configuration.
kuthair commented 1 year ago

Ahh .. open -a Fork works.

Yes, it's in my path. I'm using pyenv and installed git-remote-codecommit using the active pyenv python version.

The executable sits in my ~/.pyenv/shims folder which is in the path.

Probably #2 will work too -- I will see about doing that, thank you.

kuthair commented 1 year ago

OK, I can't find a way to set the absolute path to git-remote-codecommit.

But...

Looks like the issue is how Pyenv sets the PATH statement. I'm using ZSH, this is what I have in my .zprofile:

export PYENV_ROOT="$HOME/.pyenv"
export PATH="$PYENV_ROOT/bin:$HOME/local/bin:$PATH"
eval "$(pyenv init --path)"  # Add shims to path

An easy fix was copying the git-remote-codecommit executable to /usr/local/bin.

Thanks for your help!

RockyMM commented 2 months ago

I encountered a similar issue and the solution I used is to install git-remote-codecommit using Homebrew. Then the package would be in the path of non-login shells too, and thus Fork could use it.