GitHub Action: The process ‘/usr/bin/git‘ failed with exit code 128 解决方案

文章讲述了在遇到GitHubActions执行时出现/Theprocess/usr/bin/gitfailedwithexitcode128/错误的情况,解决方案是修改仓库的main.yml文件,取消第56行的注释,使用GitHub的个人访问令牌(PersonalAccessToken)设置Secrets以赋予仓库操作权限。详细步骤包括生成个人访问令牌,将其作为ACCESS_TOKEN存入仓库Secrets,并重新运行工作流。

一、遇到问题

错误日志:

The process '/usr/bin/git' failed with exit code 128.

二、解决方法

修改main.yml文件

路径

{仓库名}/.github/workflows/main.yml

# 第56行 删除注释
token: ${{ secrets.ACCESS_TOKEN }} # Settings > Secret 建立的 ACCESS_TOKEN

设置 Secrets

  1. 后面部署的 Action 需要有操作你的仓库的权限,因此提前设置好 GitHub personal access(个人访问令牌)。
    生成教程可以看 GitHub 官方的帮助文档:创建用于命令行的个人访问令牌
  2. 授予权限的时候只给 repo 权限即可。
    在这里插入图片描述

记住这串TOKEN,网页关闭后就无法查看了
在这里插入图片描述

  1. 回到仓库,依次点击Setting->Secrets->Actions->New repository secrets
    Name填ACCESS_TOKEN ,Value填刚刚获取的TOKEN
  2. 点击上侧一排的【actions】按钮,点击左侧的【deploy】,点右侧的【Run workflow ▽】切换到main分支,选择绿色的【Run workflow】 按钮 ,此时将成功部署。

附件

转载原文地址:http://blog.saky.site/post/github-action-128/ 推荐去逛逛

(edgenat) root@autodl-container-b2b911ba00-6b40f8a2:~/NATTEN-main# pip install natten -f https://download.openmmlab.com/mmcv/dist/cu118/torch2.7.1/index.html -i https://mirrors.aliyun.com/pypi/simple/ Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Looking in links: https://download.openmmlab.com/mmcv/dist/cu118/torch2.7.1/index.html Collecting natten Downloading https://mirrors.aliyun.com/pypi/packages/5a/ca/002c2a2bb8503af754831b60b89f86ab5b289605bbcfba65daf9923eaccd/natten-0.21.1.tar.gz (2.7 MB) ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 2.7/2.7 MB 6.8 MB/s 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Building wheels for collected packages: natten Building wheel for natten (pyproject.toml) ... error error: subprocess-exited-with-error × Building wheel for natten (pyproject.toml) did not run successfully. │ exit code: 1 ╰─> [185 lines of output] /tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/torch/_subclasses/functional_tensor.py:279: UserWarning: Failed to initialize NumPy: No module named 'numpy' (Triggered internally at /pytorch/torch/csrc/utils/tensor_numpy.cpp:84.) cpu = _conversion_method_template(device=torch.device("cpu")) `NATTEN_CUDA_ARCH` not set, but detected CUDA driver with PyTorch. Building for CUDA_ARCH='7.0'. PyTorch was built with CUDA Toolkit 128 Building NATTEN for the following architecture(s): 7.0 Number of workers: 13 running bdist_wheel running build running build_py creating build/lib.linux-x86_64-cpython-310/natten copying src/natten/__init__.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/_environment.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/_libnatten.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/attn_merge.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/context.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/functional.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/modules.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/profiler.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/token_permute.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/types.py -> build/lib.linux-x86_64-cpython-310/natten copying src/natten/version.py -> build/lib.linux-x86_64-cpython-310/natten creating build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/blackwell_fmha.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/blackwell_fna.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/flex.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/fmha.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/fna.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/hopper_fmha.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/hopper_fna.py -> build/lib.linux-x86_64-cpython-310/natten/backends copying src/natten/backends/reference.py -> build/lib.linux-x86_64-cpython-310/natten/backends creating build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/dry_run.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/formatting.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/ops.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/pretty_printer.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/problem.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils copying src/natten/profiling_utils/profiling.py -> build/lib.linux-x86_64-cpython-310/natten/profiling_utils creating build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/checks.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/device.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/dtype.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/log.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/tensor.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/testing.py -> build/lib.linux-x86_64-cpython-310/natten/utils copying src/natten/utils/tuples.py -> build/lib.linux-x86_64-cpython-310/natten/utils creating build/lib.linux-x86_64-cpython-310/natten/backends/configs copying src/natten/backends/configs/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs copying src/natten/backends/configs/checks.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs creating build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/fna_backward_128x128.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/fna_backward_128x64.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/fna_backward_64x64.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/fna_forward_32x128.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/fna_forward_64x128.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass copying src/natten/backends/configs/cutlass/fna_forward_64x64.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass creating build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass_blackwell copying src/natten/backends/configs/cutlass_blackwell/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass_blackwell creating build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass_hopper copying src/natten/backends/configs/cutlass_hopper/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/cutlass_hopper creating build/lib.linux-x86_64-cpython-310/natten/backends/configs/flex copying src/natten/backends/configs/flex/__init__.py -> build/lib.linux-x86_64-cpython-310/natten/backends/configs/flex running egg_info writing src/NATTEN.egg-info/PKG-INFO writing dependency_links to src/NATTEN.egg-info/dependency_links.txt writing top-level names to src/NATTEN.egg-info/top_level.txt reading manifest file 'src/NATTEN.egg-info/SOURCES.txt' reading manifest template 'MANIFEST.in' warning: no files found matching '*.cc' under directory 'csrc' warning: no files found matching '*.inl' under directory 'csrc' warning: no files found matching '*.cpp' under directory 'third_party/cutlass/include' warning: no files found matching '*.cuh' under directory 'third_party/cutlass/include' warning: no files found matching '*.cu' under directory 'third_party/cutlass/include' warning: no files found matching '*.txt' under directory 'third_party/cutlass/include' warning: no files found matching '*.cc' under directory 'third_party/cutlass/include' no previously-included directories found matching 'dev' no previously-included directories found matching 'site' no previously-included directories found matching 'csrc/autogen' no previously-included directories found matching 'tests' no previously-included directories found matching 'assets' no previously-included directories found matching '*/__pycache__' no previously-included directories found matching 'build/*' no previously-included directories found matching 'build_dir/*' no previously-included directories found matching 'CMakeFiles/*' adding license file 'LICENSE' adding license file 'NOTICE' writing manifest file 'src/NATTEN.egg-info/SOURCES.txt' running build_ext -- The CXX compiler identification is GNU 11.3.0 -- The CUDA compiler identification is NVIDIA 11.8.89 with host compiler GNU 11.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - done -- Check for working CXX compiler: /usr/bin/c++ - skipped -- Detecting CXX compile features -- Detecting CXX compile features - done -- Detecting CUDA compiler ABI info -- Detecting CUDA compiler ABI info - done -- Check for working CUDA compiler: /usr/local/cuda/bin/nvcc - skipped -- Detecting CUDA compile features -- Detecting CUDA compile features - done CMake Error at /tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/cmake/data/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:227 (message): Could NOT find CUDAToolkit: Found unsuitable version "11.8.89", but required is at least "12.0" (found /usr/local/cuda/targets/x86_64-linux/include) Call Stack (most recent call first): /tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/cmake/data/share/cmake-4.1/Modules/FindPackageHandleStandardArgs.cmake:589 (_FPHSA_FAILURE_MESSAGE) /tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/cmake/data/share/cmake-4.1/Modules/FindCUDAToolkit.cmake:1090 (find_package_handle_standard_args) CMakeLists.txt:6 (find_package) -- Configuring incomplete, errors occurred! Preparing to build LIBNATTEN Auto-generating kernel instantiations Stamping out reference kernels -- reference did not have any previously generated targets; direct copy. -- reference did not have any previously generated targets; direct copy. Stamping out fna kernels -- fna did not have any previously generated targets; direct copy. -- fna did not have any previously generated targets; direct copy. Stamping out fmha kernels -- fmha did not have any previously generated targets; direct copy. -- fmha did not have any previously generated targets; direct copy. Building NATTEN for the following archs: [70] (max: 70) Building with 13 workers. Build directory: /tmp/tmp7ktgpckm IS_LIBTORCH_BUILT_WITH_CXX11_ABI=True Traceback (most recent call last): File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 280, in build_wheel return _build_backend().build_wheel( File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 435, in build_wheel return _build(['bdist_wheel', '--dist-info-dir', str(metadata_directory)]) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 423, in _build return self._build_with_temp_dir( File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 404, in _build_with_temp_dir self.run_setup() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 500, in <module> File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/__init__.py", line 115, in setup return distutils.core.setup(**attrs) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 186, in setup return run_commands(dist) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/core.py", line 202, in run_commands dist.run_commands() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1002, in run_commands self.run_command(cmd) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/command/bdist_wheel.py", line 370, in run self.run_command("build") File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command self.distribution.run_command(command) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/cmd.py", line 357, in run_command self.distribution.run_command(command) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/dist.py", line 1102, in run_command super().run_command(command) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/dist.py", line 1021, in run_command cmd_obj.run() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/command/build_ext.py", line 96, in run _build_ext.run(self) File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 368, in run self.build_extensions() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 484, in build_extensions self._build_extensions_serial() File "/tmp/pip-build-env-gyhmwhcs/overlay/lib/python3.10/site-packages/setuptools/_distutils/command/build_ext.py", line 510, in _build_extensions_serial self.build_extension(ext) File "<string>", line 466, in build_extension File "/root/miniconda3/envs/edgenat/lib/python3.10/subprocess.py", line 369, in check_call raise CalledProcessError(retcode, cmd) subprocess.CalledProcessError: Command '['cmake', '/tmp/pip-install-fb67jcs4/natten_8921a7027ba34c649a135d215e8392a9/csrc', '-DPYTHON_PATH=/root/miniconda3/envs/edgenat/bin/python3.10', '-DOUTPUT_FILE_NAME=natten/libnatten.cpython-310-x86_64-linux-gnu', '-DNATTEN_CUDA_ARCH_LIST=70-real', '-DNATTEN_IS_WINDOWS=0', '-DIS_LIBTORCH_BUILT_WITH_CXX11_ABI=1']' returned non-zero exit status 1. [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed building wheel for natten Failed to build natten error: failed-wheel-build-for-install × Failed to build installable wheels for some pyproject.toml based projects ╰─> natten (edgenat) root@autodl-container-b2b911ba00-6b40f8a2:~/NATTEN-main# pip uninstall -y natten pip install natten==0.14.6 -i https://mirrors.aliyun.com/pypi/simple/ WARNING: Skipping natten as it is not installed. WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager, possibly rendering your system unusable. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv. Use the --root-user-action option if you know what you are doing and want to suppress this warning. Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting natten==0.14.6 Downloading https://mirrors.aliyun.com/pypi/packages/99/de/445919ba645b36f8fc28c9d355a3944fcfc505cadef7263bad5f01b7850a/natten-0.14.6.tar.gz (505 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-5ll6pdmy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-5ll6pdmy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-5ll6pdmy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-5ll6pdmy/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 32, in <module> ModuleNotFoundError: No module named 'torch' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed to build 'natten' when getting requirements to build wheel (edgenat) root@autodl-container-b2b911ba00-6b40f8a2:~/NATTEN-main# pip install natten==0.14.6 -i https://mirrors.aliyun.com/pypi/simple/ Looking in indexes: https://mirrors.aliyun.com/pypi/simple/ Collecting natten==0.14.6 Using cached https://mirrors.aliyun.com/pypi/packages/99/de/445919ba645b36f8fc28c9d355a3944fcfc505cadef7263bad5f01b7850a/natten-0.14.6.tar.gz (505 kB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error × Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [17 lines of output] Traceback (most recent call last): File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 389, in <module> main() File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 373, in main json_out["return_val"] = hook(**hook_input["kwargs"]) File "/root/miniconda3/envs/edgenat/lib/python3.10/site-packages/pip/_vendor/pyproject_hooks/_in_process/_in_process.py", line 143, in get_requires_for_build_wheel return hook(config_settings) File "/tmp/pip-build-env-k1otb380/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 331, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=[]) File "/tmp/pip-build-env-k1otb380/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 301, in _get_build_requires self.run_setup() File "/tmp/pip-build-env-k1otb380/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 512, in run_setup super().run_setup(setup_script=setup_script) File "/tmp/pip-build-env-k1otb380/overlay/lib/python3.10/site-packages/setuptools/build_meta.py", line 317, in run_setup exec(code, locals()) File "<string>", line 32, in <module> ModuleNotFoundError: No module named 'torch' [end of output] note: This error originates from a subprocess, and is likely not a problem with pip. ERROR: Failed to build 'natten' when getting requirements to build wheel (edgenat) root@autodl-container-b2b911ba00-6b40f8a2:~/NATTEN-main#
最新发布
11-11
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值