Skip to content
This repository was archived by the owner on Jun 1, 2022. It is now read-only.
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

Open

Description

@PhilipRoman

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.

Activity

  1. lighttiger2505 commented on Sep 18, 2018

    @lighttiger2505
    Owner

    Thank you for contributing !!!

    Failed collect git remove infos. exit status 128.

    This error is caused by do git remote failing.
    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.

  2. lighttiger2505 commented on Sep 18, 2018

    @lighttiger2505
    Owner

    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 | bash
  3. PhilipRoman commented on Sep 19, 2018

    @PhilipRoman
    Author

    Okay, I think I have this figured out.

    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!

  4. lighttiger2505 commented on Sep 20, 2018

    @lighttiger2505
    Owner

    Please let me check.

    1. Running the lab on a windows file system(/mnt/c) results in an error.
      Because git is executed instead of git.exe which should be aliased.
    2. Running the lab on a linux file system(Other mnt/c) results in an success.

    OK ?

  5. lighttiger2505 commented on Sep 20, 2018

    @lighttiger2505
    Owner

    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.

  6. PhilipRoman commented on Sep 20, 2018

    @PhilipRoman
    Author

    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!

  7. lighttiger2505 commented on Sep 22, 2018

    @lighttiger2505
    Owner

    Hmmm...

    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.

  8. PhilipRoman commented on Sep 22, 2018

    @PhilipRoman
    Author

    Actually I guess I should just rename git to git-real and create my own script called git. This should be a fairly robust solution.

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

Metadata

Metadata

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions