How can I run Envoy as root? I have a company server which has root
access disabled, but I can sudo -s
to it.
For example, when running git pull
through Envoy I am getting:
[jenkins]: error: cannot open.git/FETCH_HEAD: Permission denied
I have tried adding sudo -s
to it:
@task('deploy')
sudo -s
git pull
@endtask
But this only results in:
[jenkins]: sudo: no tty present and no askpass program specified
Is there a way to run Envoy as root?
Just log in to the server as root
@servers(['web' => 'root@webserver.example.com'])
But logging in as root and running commands is not the most secure way. At least disable password login for root after setting up ssh keys.
In perfect world, you should have a user which can run commands needed for deployment only.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.