donxbje866688 2019-07-10 13:40
浏览 36
已采纳

在鱼壳上使用`go`

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/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.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 metadata提取的PDF元数据,如何转换为一个Excel
  • ¥15 关于arduino编程toCharArray()函数的使用
  • ¥100 vc++混合CEF采用CLR方式编译报错
  • ¥15 coze 的插件输入飞书多维表格 app_token 后一直显示错误,如何解决?
  • ¥15 vite+vue3+plyr播放本地public文件夹下视频无法加载
  • ¥15 c#逐行读取txt文本,但是每一行里面数据之间空格数量不同
  • ¥50 如何openEuler 22.03上安装配置drbd
  • ¥20 ING91680C BLE5.3 芯片怎么实现串口收发数据
  • ¥15 无线连接树莓派,无法执行update,如何解决?(相关搜索:软件下载)
  • ¥15 Windows11, backspace, enter, space键失灵