explaingit

yaegor/runas

Analysis updated 2026-07-10 · repo last pushed 2019-11-04

Audience · ops devopsComplexity · 3/5DormantSetup · moderate

TLDR

A TeamCity plugin that runs build jobs under different user accounts for security isolation and flexible permission control in shared CI environments.

Mindmap

mindmap
  root((repo))
    What it does
      Runs builds as other users
      Wraps build scripts
      Isolates jobs
    Tech stack
      IntelliJ IDEA
      TeamCity plugin
      Java
    Use cases
      Production deploys
      Restricted builds
      Multi-user CI
    Requirements
      Privileged agent account
      PsExec or sudo
      TeamCity server
    Setup
      Drop zip in plugins
      Restart server
      Configure helper
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Run production deployment builds under a dedicated deployment account with elevated access.

USE CASE 2

Execute normal compile jobs under a restricted user account for better security isolation.

USE CASE 3

Share a single TeamCity agent across projects by impersonating different users per build via build parameters.

What is it built with?

JavaIntelliJ IDEATeamCity

How does it compare?

yaegor/runas0xhassaan/nn-from-scratch0xzgbot/hermes-comfyui-skills
Stars00
LanguagePython
Last pushed2019-11-04
MaintenanceDormant
Setup difficultymoderatemoderateeasy
Complexity3/54/51/5
Audienceops devopsdeveloperdesigner

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires TeamCity server plus agents running under a privileged account capable of spawning processes as other users, and a helper program like PsExec or sudo.

No license information is provided in the explanation, so the permissions for using this code are unknown.

In plain English

The RunAs plugin for JetBrains TeamCity lets you run automated build jobs under different user accounts, or perform extra actions before or after a build. The core benefit is security and flexibility: in a shared continuous-integration setup you can isolate jobs from one another and control exactly which permissions each build gets. TeamCity is a server that automatically compiles, tests, and packages software. By default its "build agents" run each job under a single fixed account. This plugin adds a configurable command that wraps the build script, so the script can be handed off to another executable or user before it runs. You set a property on the agent pointing to a helper program, such as Windows Sysinternals PsExec or the Linux sudo command, and the plugin injects the real build command into that helper. Build parameters can supply the target username and password, so a single agent can impersonate different users per project. This is useful for teams that need strict permission boundaries. For example, a build that deploys to production might require an account with deployment access, while a normal compile job should use a restricted account. On Linux, the plugin's example script changes ownership of the working and temp directories to the target user, then runs the build via sudo. A practical requirement is that the agent itself must already be running under a privileged account, since it needs permission to spawn and manage processes as other users. The project is built in IntelliJ IDEA and packaged as a zip that you drop into the TeamCity plugins folder, after which a server restart pushes the update to all agents. The README provides Windows and Linux examples but doesn't go into detail on advanced configuration beyond them.

Copy-paste prompts

Prompt 1
Set up the RunAs TeamCity plugin to run my build job as a different Linux user using sudo, including the example script that changes directory ownership before running the build.
Prompt 2
Configure the RunAs plugin on Windows TeamCity agents to use Sysinternals PsExec so builds run under alternate user accounts supplied via build parameters.
Prompt 3
Walk me through installing the RunAs plugin in TeamCity and configuring the agent property to point to a helper program that wraps build scripts.
Prompt 4
Show me how to isolate CI build jobs on a shared TeamCity agent so each project runs under its own user account with different permissions.

Frequently asked questions

What is runas?

A TeamCity plugin that runs build jobs under different user accounts for security isolation and flexible permission control in shared CI environments.

Is runas actively maintained?

Dormant — no commits in 2+ years (last push 2019-11-04).

What license does runas use?

No license information is provided in the explanation, so the permissions for using this code are unknown.

How hard is runas to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is runas for?

Mainly ops devops.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.