Skip to content

ci(bot): deploy through sudo when the server has root login off - #308

Merged
maximilianfeix merged 2 commits into
mainfrom
ci/deploy-as-sudo-user
Oct 10, 2026
Merged

maximilianfeix merged 2 commits into
mainfrom
ci/deploy-as-sudo-user

Conversation

@maximilianfeix

Copy link
Copy Markdown
Owner

The deploy job logged in as root. Servers with PermitRootLogin no reject that.

  • New repository variable DEPLOY_USER: a user that may run sudo without a password. The workflow logs in as that user and runs the same three steps through sudo -n.
  • Without the variable the job behaves as before and logs in as root.
  • tar gets --no-same-owner so the files belong to root on the server in both cases.
  • README of the bot updated.

Set the repository variable DEPLOY_USER to a user with passwordless sudo and
the workflow logs in as that user. Without the variable it still logs in as
root, as before.
@maximilianfeix
maximilianfeix merged commit ceb7eef into main Oct 10, 2026
21 checks passed
@maximilianfeix
maximilianfeix deleted the ci/deploy-as-sudo-user branch October 10, 2026 19:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant