Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
从二进制安装 Gitea 后,我只能从 gitea 主目录运行 Gitea 命令,例如。./gitea -v
./gitea -v
如何设置路径以便终端响应 Gitea 命令?服务器已启动并正在运行并已创建帐户等。
是否需要以某种方式将路径添加到.bashrc文件中?
.bashrc
答案应该使“gitea”能够在终端中作为命令键入,而不仅仅是在主 Gitea 文件夹中。
你试过export在你的.bashrc?
export
export PATH=$PATH:/my/path/to/gitea
通过添加$PATH导出,它会附加路径gitea路径而不是覆盖PATH环境变量。
$PATH
gitea
PATH