{"id":23271,"library":"apache-airflow-providers-git","title":"Apache Airflow Provider for Git","description":"A provider that allows Apache Airflow to interact with Git repositories. Current version 0.3.1, supports Python >=3.10. Release cadence follows Airflow provider lifecycle.","status":"active","version":"0.3.1","language":"python","source_language":"en","source_url":"https://github.com/apache/airflow/tree/main/providers/apache-airflow-providers-git","tags":["airflow","provider","git","version-control","deprecated"],"install":[{"cmd":"pip install apache-airflow-providers-git","lang":"bash","label":"Install provider"}],"dependencies":[],"imports":[{"note":"Old import path deprecated in Airflow 2.0","wrong":"from airflow.hooks.git_hook import GitHook","symbol":"GitHook","correct":"from airflow.providers.git.hooks.git import GitHook"}],"quickstart":{"code":"from airflow import DAG\nfrom airflow.operators.python import PythonOperator\nfrom airflow.providers.git.hooks.git import GitHook\nfrom datetime import datetime\n\nwith DAG('git_example', start_date=datetime(2024,1,1), schedule=None, catchup=False) as dag:\n    def clone_repo():\n        hook = GitHook(git_conn_id='my_git_conn')\n        repo_dir = hook.clone_repository()\n        print(f'Cloned to {repo_dir}')\n    PythonOperator(task_id='clone', python_callable=clone_repo)","lang":"python","description":"Minimal example: create a Git connection in Airflow UI, then use GitHook to clone a repo."},"warnings":[{"fix":"Replace with airflow.providers.git.operators.git_clone or use GitPython directly via BashOperator.","message":"The GitProvider is considered deprecated as of Airflow 2.10. No active development; consider migrating to 'gitpython' operator or custom hook.","severity":"deprecated","affected_versions":">=2.10"},{"fix":"Create a connection in Airflow UI with Conn Type 'Git' and provide repo URL and credentials.","message":"GitHook requires a pre-configured Airflow connection of type 'Git'. If not set, you'll get an obscure AirflowNotFoundException.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'from airflow.providers.git.hooks.git import GitHook'","message":"Renamed from 'git_hook' to 'git.hooks.git' in provider version 0.3.0. Old imports will raise ModuleNotFoundError.","severity":"breaking","affected_versions":">=0.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install apache-airflow-providers-git' and ensure Airflow >=2.1.","cause":"Provider package not installed or Airflow version incompatible.","error":"ModuleNotFoundError: No module named 'airflow.providers.git'"},{"fix":"Create a Git connection in Airflow UI with Conn Id 'git_default'. Or pass a valid git_conn_id to GitHook.","cause":"Missing Airflow connection for Git.","error":"AirflowNotFoundException: The conn_id `git_default` isn't defined"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}