如何在IntelliJ中移除或修改Subversion全局仓库URL
Got it, let's tackle this annoying issue where you can't delete or modify that misconfigured Kongur repo entry (with the accidental backslash in the URL) via IntelliJ's UI. Since the GUI isn't playing nice, we'll go straight to the underlying configuration files—here's the step-by-step:
Step 1: Close IntelliJ IDEA First
Make sure you fully shut down IntelliJ (including any background processes) before editing config files. This prevents file locks or conflicts that might make your changes not stick.
Step 2: Locate the Subversion Global Config File
The problematic entry is likely stored in Subversion's global servers file. The path varies by OS:
- Windows: Open File Explorer, paste
%APPDATA%\Subversioninto the address bar, then look for theserversfile. - macOS: Open Terminal and run
open ~/.subversion/serversto open the file with your default text editor. - Linux: In Terminal, use
nano ~/.subversion/servers(or your preferred editor like vim) to edit the file directly.
Step 3: Edit the Config File to Remove/Fix the Entry
Open the servers file and scan for the section related to your Kongur repo. It’ll look something like this:
[KongurRepo] url = https://your-repo-url.com\wrong-path # Other Kongur-related config lines might be here too
Delete the entire section (from the [KongurRepo] line down to the start of the next section) or just fix the URL by removing the backslash. Save the file once you’re done.
Step 4: Fallback: Check IntelliJ’s Own SVN Config
If the above doesn’t work, the entry might be stored in IntelliJ’s local config instead. Head to this path (replace <version> with your IntelliJ version, e.g., 2023.2):
- Windows:
%USERPROFILE%\.IntelliJIdea<version>\config\options\svn.xml - macOS:
~/Library/Application Support/JetBrains/IntelliJIdea<version>/options/svn.xml - Linux:
~/.config/JetBrains/IntelliJIdea<version>/options/svn.xml
Open svn.xml in a text editor, search for the URL with the backslash, delete the entire XML node that contains it, then save the file.
Step 5: Restart IntelliJ
Fire up IntelliJ again, navigate back to Settings > Version Control > Subversion > Network, and you should see the problematic Kongur repo entry is gone (or editable if you fixed the URL instead of deleting it).
内容的提问来源于stack exchange,提问作者Bejond

