From: Federico Ceratto <federico@debian.org>
Subject: Handle missing config file
Forwarded: no

--- a/gitlab/cli.py
+++ b/gitlab/cli.py
@@ -310,6 +310,11 @@
     try:
         config = gitlab.config.GitlabConfigParser(options.gitlab, options.config_file)
     except gitlab.config.ConfigError as e:
+        if "Impossible to get the gitlab id" in str(e):
+            sys.exit("""
+Please create a configuration file at ~/.python-gitlab.cfg
+See /usr/share/doc/gitlab-cli/examples/python-gitlab.cfg
+""")
         if "--help" in sys.argv or "-h" in sys.argv:
             parser.print_help()
             sys.exit(0)
