You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 1, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Jun 1, 2022. It is now read-only.
"Failed collect git remove infos. exit status 128." #64
I installed the binary but any sub-command (other than simply typing "lab") will show this error message: Failed collect git remove infos. exit status 128. . Git is installed and works correctly. I am using Windows Subsystem for Linux.
My Windows file system is mounted on /mnt/c
A long time ago I noticed that git from linux has trouble with files within /mnt/c but git.exe from windows could not access files unless they were in /mnt/c. I solved this by aliasing git to `if inwindows; then echo git.exe; else echo git; fi` - choosing between git and git.exe depending on current directory.
Now, lab obviously calls git without doing any shell expansions and thus it fails when inside /mnt/c. For the record, here is the error: fatal: Could not chdir to 'C:/Users/usr/xxx: No such file or directory.
Solution
There should be some way of configuring the git command that is called, maybe an env variable or command line option (something like alias lab='lab --git-cmd=...')?
Unfortunately I'm not too familiar with Go so I can't PR.
Also, thank you for the commit - I never would've figured it out without it!
There should be some way of configuring the git command that is called, maybe an env variable or command line option (something like alias lab='lab --git-cmd=...')?
I appreciate your suggestion.
But I think your case is special.
I think that it is better to use the git command in an appropriate place rather than using it differently depending on the location.
If possible we want you to use lab on the linux file system.
Yeah, lab works good outside of /mnt/c. Unfortunately I can't move the repo to the linux file system. Even if this is an edge case, I don't think that option to choose custom git command would be difficult to implement or maintain. If not, I can always fork this, implement the patch and use my own forked version. Thank you for helping me resolve this!
I was thinking about adding --git-cmd option, but I thought it would be bad to add specific environment dependent options.
Because the git command does not need to switch at all in a general unix/linux environment.
I may not start with this issue at once, but I would like to think about other methods.
Activity
lighttiger2505 commentedon Sep 18, 2018
Thank you for contributing !!!
This error is caused by do
git remotefailing.Please move to the error repository on your console and confirm that you can do
git remote.Unfortunately I do not have Windows so I can not reproduce your error.
I need your cooperation to resolve this error.
Of course you are also welcome to pull request.
lighttiger2505 commentedon Sep 18, 2018
I added code for error tracking of Git command with this commit.
If you install and run this release binary you can see more detailed error.
Reinstallation can be done by executing the command below.
curl -s https://raw.githubusercontent.com/lighttiger2505/lab/master/install.sh | bashPhilipRoman commentedon Sep 19, 2018
Okay, I think I have this figured out.
My Windows file system is mounted on
/mnt/cA long time ago I noticed that
gitfrom linux has trouble with files within/mnt/cbutgit.exefrom windows could not access files unless they were in/mnt/c. I solved this by aliasinggitto`if inwindows; then echo git.exe; else echo git; fi`- choosing betweengitandgit.exedepending on current directory.Now,
labobviously callsgitwithout doing any shell expansions and thus it fails when inside/mnt/c. For the record, here is the error:fatal: Could not chdir to 'C:/Users/usr/xxx: No such file or directory.Solution
There should be some way of configuring the git command that is called, maybe an env variable or command line option (something like
alias lab='lab --git-cmd=...')?Unfortunately I'm not too familiar with Go so I can't PR.
Also, thank you for the commit - I never would've figured it out without it!
lighttiger2505 commentedon Sep 20, 2018
Please let me check.
/mnt/c) results in an error.Because git is executed instead of git.exe which should be aliased.
mnt/c) results in an success.OK ?
lighttiger2505 commentedon Sep 20, 2018
I appreciate your suggestion.
But I think your case is special.
I think that it is better to use the git command in an appropriate place rather than using it differently depending on the location.
If possible we want you to use lab on the linux file system.
PhilipRoman commentedon Sep 20, 2018
Yeah, lab works good outside of
/mnt/c. Unfortunately I can't move the repo to the linux file system. Even if this is an edge case, I don't think that option to choose custom git command would be difficult to implement or maintain. If not, I can always fork this, implement the patch and use my own forked version. Thank you for helping me resolve this!lighttiger2505 commentedon Sep 22, 2018
Hmmm...
I was thinking about adding
--git-cmdoption, but I thought it would be bad to add specific environment dependent options.Because the git command does not need to switch at all in a general unix/linux environment.
I may not start with this issue at once, but I would like to think about other methods.
PhilipRoman commentedon Sep 22, 2018
Actually I guess I should just rename
gittogit-realand create my own script calledgit. This should be a fairly robust solution.