You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

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
  • 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 vim on Linux, Notepad++ on Windows). Look for the <users> section, find the locked user’s entry. It’ll look something like this:
    <user id="some-id" username="your-locked-user" enabled="false" email="user@example.com">
      <!-- other user settings -->
    </user>
    
    Change enabled="false" to enabled="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

Once the server is back up, the user should be able to log in again.

内容的提问来源于stack exchange,提问作者Boris Burkov

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.19 10:07:07