Open Salamek opened 1 year ago
Hello @Salamek ,
I suppose the error I am getting whenever I try to update any of the existing configuration is related to this.
gitlab-tools-gitlab-tools-1 | [app] [2023-04-02 01:35:02,180] ERROR in app: Exception on /fingerprint/fingerprint-check [POST]
gitlab-tools-gitlab-tools-1 | [app] Traceback (most recent call last):
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask/app.py", line 2447, in wsgi_app
gitlab-tools-gitlab-tools-1 | [app] response = self.full_dispatch_request()
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask/app.py", line 1952, in full_dispatch_request
gitlab-tools-gitlab-tools-1 | [app] rv = self.handle_user_exception(e)
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask/app.py", line 1821, in handle_user_exception
gitlab-tools-gitlab-tools-1 | [app] reraise(exc_type, exc_value, tb)
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask/_compat.py", line 39, in reraise
gitlab-tools-gitlab-tools-1 | [app] raise value
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask/app.py", line 1950, in full_dispatch_request
gitlab-tools-gitlab-tools-1 | [app] rv = self.dispatch_request()
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask/app.py", line 1936, in dispatch_request
gitlab-tools-gitlab-tools-1 | [app] return self.view_functions[rule.endpoint](**req.view_args)
gitlab-tools-gitlab-tools-1 | [app] File "/opt/gitlab-tools/venv/lib/python3.9/site-packages/flask_login/utils.py", line 272, in decorated_view
gitlab-tools-gitlab-tools-1 | [app] return func(*args, **kwargs)
gitlab-tools-gitlab-tools-1 | [app] File "./gitlab_tools/views/fingerprint/index.py", line 163, in check_hostname_fingerprint
gitlab-tools-gitlab-tools-1 | [app] return check_fingerprint_hostname(hostname)
gitlab-tools-gitlab-tools-1 | [app] File "./gitlab_tools/views/fingerprint/index.py", line 39, in check_fingerprint_hostname
gitlab-tools-gitlab-tools-1 | [app] found, remote_server_key = check_hostname(hostname, known_hosts_path)
gitlab-tools-gitlab-tools-1 | [app] File "./gitlab_tools/tools/fingerprint.py", line 31, in check_hostname
gitlab-tools-gitlab-tools-1 | [app] remote_server_key = get_remote_server_key_for_hostname(hostname)
gitlab-tools-gitlab-tools-1 | [app] File "./gitlab_tools/tools/fingerprint.py", line 12, in get_remote_server_key_for_hostname
gitlab-tools-gitlab-tools-1 | [app] return get_remote_server_key(hostname)
gitlab-tools-gitlab-tools-1 | [app] File "./gitlab_tools/tools/crypto.py", line 72, in get_remote_server_key
gitlab-tools-gitlab-tools-1 | [app] my_socket.connect((ip, port))
gitlab-tools-gitlab-tools-1 | [app] socket.gaierror: [Errno -2] Name or service not known
Is there any workaround for this?
@cenk1cenk2 did you set
GITLAB_SSH = 'gitlab.your-domain.com:22'
in your /etc/gitlab-tools/config.yml ? as is mentioned in 1.3 release notes?
Yeah, sorry I suppose I have missed one and failed to read the release note since directly updated to 1.4.4.
Sorry for taking your time the reply but I really do appreciate it!
Have a very nice day @Salamek!
Issue
Currently when checking fingerprint, we use
GITLAB_SSH
config option withhostname:port
of gitlab SSH server, but gitlab API actually returns a ssh URI for created/existing project. Issue is that project creation is handled in async task (celery) and no user interaction is possible, that means that mirror has to already exist in database when task is triggered...