gitlab9.3.9 upgrade to 11.9, git pull OR git clone don't work
My surroundings:
docker-compose.yaml
web: image: 'gitlab-ce:11.9.1-ce.0' container_name: gitlab_web restart: always hostname: 'gitlabweb' environment: GITLAB_OMNIBUS_CONFIG: | external_url ' gitlab_rails['time_zone'] = 'Asia/Shanghai' gitlab_rails['admin_email_worker_cron'] = "0 0 * 0 *" gitlab_rails['gitlab_shell_ssh_port'] = 8081 nginx['listen_port'] = 8081 ports: - '8081:8081' volumes: - './git_data:/var/opt/gitlab' - './gitconfig:/etc/gitlab' - './git_log:/var/log/gitlab'Try in my client PC OR Server's container(gitlab_web) :
Re-created my ssh keys and rm ~/.ssh/known_hosts , but git pull OR clone problem still exists:
$ git clone ssh://:8081/poc/53.git
Cloning into '53'...
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.Ask for help
11 Answer
fix:
Server work:
1. change Gitlab server host SSH port from 22 to 222 and restart ssh service
$vi /etc/ssh/sshd_config
$/etc/init.d/ssh restart- docker-compose.yaml add ssh port 22
ports: - '8081:8081' - '22:22'- docker-compose down
- docker-compose up -d
Client work:
delete ~/.ssh/known_hosts