{"id":7108,"library":"condor-git-config","title":"condor-git-config","description":"condor-git-config is a Python library and executable designed to dynamically configure an HTCondor node from a Git repository. It functions as a hook within HTCondor's configuration system, allowing administrators to manage node configurations via version control. The library is currently at version 0.1.5 and appears to have an active, though infrequent, release cadence, with updates addressing specific operational improvements.","status":"active","version":"0.1.5","language":"en","source_language":"en","source_url":"https://github.com/matterminers/condor-git-config","tags":["HTCondor","configuration","git","devops","system-administration"],"install":[{"cmd":"pip install condor-git-config","lang":"bash","label":"Install stable version"}],"dependencies":[],"imports":[{"note":"The core functionality is exposed via a command-line interface integrated into HTCondor config files, rather than Python API calls.","symbol":"condor-git-config (executable)","correct":"This library is primarily intended as an executable to be invoked by HTCondor's configuration system, not as a Python module for direct 'import' in user scripts."}],"quickstart":{"code":"# This command would be placed in an HTCondor configuration file (e.g., condor_config.local)\n# It tells HTCondor to execute condor-git-config, which then fetches and applies configuration\n# from the specified Git repository.\n# The --ff-only flag was added in v0.1.5 for safer pulls.\ninclude command : condor-git-config https://github.com/your_org/your_condor_configs.git --ff-only","lang":"bash","description":"To integrate `condor-git-config` into your HTCondor setup, add an `include command` entry to your HTCondor configuration file (e.g., `/etc/condor/condor_config.local`). This command will execute `condor-git-config`, which pulls configuration files from the specified Git repository and incorporates them into the HTCondor daemon's configuration. Remember to replace `https://github.com/your_org/your_condor_configs.git` with your actual repository URL."},"warnings":[{"fix":"Ensure the Git repository used for configuration is maintained with a linear history, or be prepared to manually resolve divergent histories if not using fast-forward only updates. Users migrating from older versions should review their Git repository update strategy.","message":"Version 0.1.5 introduced the `--ff-only` flag to the internal `git pull` command. This changes the behavior from potentially merging divergent branches to only allowing fast-forward updates. If the remote branch has diverged from the local copy, the pull will fail, requiring manual intervention or a different Git strategy. [cite: Changelog]","severity":"breaking","affected_versions":">=0.1.5"},{"fix":"Avoid shell escaping when defining arguments in the HTCondor `include command`. Pass arguments as literal strings. If complex arguments are needed, consider passing them via a file or environment variable that `condor-git-config` can interpret.","message":"Arguments passed to `condor-git-config` via HTCondor's `include command` syntax are passed directly to the program without invoking a shell. This means that shell-specific escapes and quotes (e.g., for spaces in arguments or special characters) should NOT be used in the HTCondor configuration file.","severity":"gotcha","affected_versions":"All versions"},{"fix":"If your configuration files are in sub-directories or use different file extensions, you must specify appropriate `--include`, `--exclude`, or recursion options (e.g., `--recurse`) when invoking `condor-git-config` in your HTCondor configuration.","message":"By default, `condor-git-config` will only include top-level files ending in `.cfg` and will not recurse into sub-directories unless explicitly configured with regular expression patterns for inclusion/exclusion or recursion.","severity":"gotcha","affected_versions":"All versions"},{"fix":"Implement a mechanism to trigger `condor_reconfig` or `condor_restart` on the HTCondor node after `condor-git-config` has updated the configuration files, especially for changes affecting running daemons.","message":"Changes applied by `condor-git-config` to HTCondor configuration files typically require an HTCondor daemon reconfigure (`condor_reconfig`) or restart (`condor_restart`) to take effect. Simply updating the Git repository won't immediately update running daemons.","severity":"gotcha","affected_versions":"All versions"}],"env_vars":null,"last_verified":"2026-04-16T00:00:00.000Z","next_check":"2026-07-15T00:00:00.000Z","problems":[{"fix":"Investigate the `.git/config` file within the cloned repository on the affected node. If possible, try to correct the file's syntax or, as a last resort, delete and re-clone the repository used by `condor-git-config`.","cause":"The Git repository's internal `.git/config` file, which `condor-git-config` interacts with, has become corrupted or unreadable on the HTCondor node. This can happen due to disk errors, unexpected shutdowns, or manual tampering.","error":"fatal: bad config file line 1 in .git/config"},{"fix":"Remove any shell-specific quotes (single or double) and escape characters from the arguments in the HTCondor `include command`. Pass the arguments literally as `condor-git-config` expects them.","cause":"Arguments passed to `condor-git-config` within the HTCondor `include command` are being misinterpreted, often due to incorrect or unintended shell escaping, even though a shell is not invoked. This typically happens when users apply shell-like quoting.","error":"condor-git-config: error: unrecognized arguments"},{"fix":"Verify the Git repository URL is correct and accessible from the HTCondor node. Ensure proper network connectivity and that any required Git credentials (e.g., SSH keys, HTTPS tokens) are correctly configured for the user running `condor-git-config`.","cause":"The Git repository URL provided to `condor-git-config` is incorrect, the repository does not exist, or the HTCondor node lacks the necessary network access or authentication to reach the repository.","error":"fatal: repository 'https://git.mydomain.com/condor-repos/condor-configs.git' not found"}]}