donxbje866688 2019-07-10 13:40
浏览 36


I am struggling with running go in the fish shell.

A) I followed the installation procedure and installed go as specified in the documentation

However, when I run go version, I am getting a fatal error:

fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).

When I initialize the git by git init, I receive another error:

error: pathspec 'version' did not match any file(s) known to git

I have the paths configured in my fish config as follows:

set -gx GOPATH /home/<user>/go
set -gx PATH $PATH /usr/local/bin/go $GOPATH/bin

where /usr/local/bin/go is an output of which go in both bash and fish

Running it like bash -c 'go version', however, works without any problems (even without the git directory).

B) Also tried gofish and dnf to install go, the same results

Any help is greatly appreciated!

Additional info:

  • Fish version: fish, version 3.0.2
  • Operating system: Linux t460s 5.0.13-300.fc30.x86_64 x86_64 GNU/Linux
  • 写回答

2条回答 默认 最新

  • dongzhui2636 2019-07-10 14:16

    Could this be some kind of alias that is used instead? The error message is an error from the git binary.

    Take a look in your file ~/.config/fish/ and see if you find an alias there. If you do not find anything there look at the files in ~/.config/fish/ and subfolders.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?



  • ¥40 求一款能支持ios15以上的屏蔽越狱插件。比较好用的
  • ¥15 C++ QT对比内存字符(形式不定)
  • ¥30 C++第三方库libiconv 远程安装协助
  • ¥15 这2句代码如何理解
  • ¥15 duilib开发文本字串超过长度显示
  • ¥20 mysql的.ibd文件为啥那么多
  • ¥15 C++中采用栈和BFS算法求解迷宫问题
  • ¥15 关于#java#的问题:这是跳转失败出现的界面这是哪个出现问题的servlet(开发工具-ide)
  • ¥15 EBS R12费用采购跨月冲销
  • ¥15 python中用mplfinance如何做到多股同列?