# Host模式下，如何解决permission问题

**URL:** <https://forum.gitea.com/t/host-permission/9223>\
**Category:** 中文求助(Chinese Only)\
**Created:** [May 28, 2024, 5:01pm UTC](https://forum.gitea.com/t/host-permission/9223 "2024-05-28T17:01:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![i2000s](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.gitea.com/i2000s/32/5962_2.png) [@i2000s](https://forum.gitea.com/u/i2000s)\
**Post date:** [May 28, 2024, 5:01pm UTC](https://forum.gitea.com/t/host-permission/9223/1 "2024-05-28T17:01:34Z")

</div>

如题，gitea上用actions做了CI/CD的尝试，runner没用docker镜像，因为电脑没法从外网获取镜像文件，遂采取host模式写了个配置。但是由于代码仓等都处于系统目录下，需要至少有sudo权限才能操作。这种情况下，如何避免反复向steps里的命令行不同传递sudo密码的尴尬？

配置yaml文件详见这里：[Cannot run actions on a host environment](https://forum.gitea.com/t/cannot-run-actions-on-a-host-environment/9218)

PS：目前即使用了sudo模式去运行脚本，也没有实现actions的实际运行。请指教！
