GoCD中cruise-config.xml磁盘位置咨询及锁登后手动修改求助
GoCD cruise-config.xml 存储位置及锁定用户后的手动修复方案
Hey there, I’ve dealt with this exact scenario before—let’s break down your questions clearly:
1. cruise-config.xml 的磁盘存储位置
The location varies depending on your operating system:
- Linux/Unix systems: You’ll find it at
/var/lib/go-server/config/cruise-config.xml - Windows: The default path is
C:\Program Files\Go Server\config\cruise-config.xml - macOS (installed via Homebrew): Check
/usr/local/var/lib/go-server/config/cruise-config.xml
If you installed GoCD with a custom setup, you might need to check your server’s startup scripts or configuration for a non-standard path, but the above are the standard defaults.
2. Fixing a locked user by editing cruise-config.xml
If you’re locked out and need to manually unlock a user, follow these steps carefully:
- First, stop the GoCD server: This is critical to prevent the server from overwriting your changes while you edit.
- Linux: Run
sudo service go-server stop - Windows: Open Services, find "Go Server", and click Stop
- macOS: Use
brew services stop go-server
- Linux: Run
- Backup the config file: Always make a copy before editing to avoid breaking things. For Linux:
cp /var/lib/go-server/config/cruise-config.xml /var/lib/go-server/config/cruise-config.xml.bak - Edit the XML file: Open it with a text editor (like
vimon Linux, Notepad++ on Windows). Look for the<users>section, find the locked user’s entry. It’ll look something like this:
Change<user id="some-id" username="your-locked-user" enabled="false" email="user@example.com"> <!-- other user settings --> </user>enabled="false"toenabled="true". If there’s a separate<lock>tag under the user, remove that as well (some older GoCD versions used this instead of the enabled flag). - Save the file and restart the server:
- Linux:
sudo service go-server start - Windows: Start the "Go Server" service again
- macOS:
brew services start go-server
- Linux:
Once the server is back up, the user should be able to log in again.
内容的提问来源于stack exchange,提问作者Boris Burkov
相关产品推荐
相关产品推荐

