-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ACCES ssh par le client git, avec auth à base de paire de clés asymétriques RSA #18
Comments
Avec la variable d'environnement ajoutée, voici le résultat que j'obtiens :
[jbl@pc-172 ~]$ telnet localhost 2222
Trying ::1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
^C
[jbl@pc-172 infra-kytes]$ ssh git@gitlab.kytes.io -p 2222
Connection reset by 192.168.1.32 port 2222
[jbl@pc-172 infra-kytes]$
[jbl@pc-172 ~]$ docker exec -it kytes_gitlab_service bash -c "telnet localhost 22"
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
^C
Connection closed by foreign host.
[jbl@pc-172 ~]$ docker exec -it kytes_gitlab_service bash -c "telnet 0.0.0.0 22"
Trying 0.0.0.0...
Connected to 0.0.0.0.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
^C
Connection closed by foreign host.
[jbl@pc-172 ~]$ docker exec -it kytes_gitlab_service bash -c "telnet gitlab.kytes.io 22"
Trying 172.18.0.7...
Connected to gitlab.kytes.io.
Escape character is '^]'.
SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.4
exit
Protocol mismatch.
Connection closed by foreign host.
[jbl@pc-172 ~]$ docker exec -it kytes_gitlab_service bash -c "ssh git@gitlab.kytes.io:22"
ssh: Could not resolve hostname gitlab.kytes.io:22: Name or service not known
[jbl@pc-172 ~]$ docker exec -it kytes_gitlab_service bash -c "ssh git@gitlab.kytes.io -p 22"
Connection reset by 172.18.0.7 port 22
[jbl@pc-172 ~]$
Et dans tous les cas : [jbl@pc-172 ~]$ export GIT_SSH_COMMAND='ssh -i ~/.ssh/id_rsa' && git clone "ssh://git@gitlab.kytes.io:2222/kytes-it/etudes/gantt-and-calendars/DHTMLX-DHX-COMPANY/gantt-angular2-recipe.git"
Cloning into 'gantt-angular2-recipe'...
Connection reset by 192.168.1.32 port 2222
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
[jbl@pc-172 ~]$
|
Ok, avec le test consistant à changer la valeur de l'adresse IP de binding interface réseau Hôte Docker, (de jbl@pc-alienware-jbl:~/test-iaac-kytes$ git clone "git@$NOM_HOTE_RESEAU_GITLAB:$NOM_COMPLET_GROUPE_GITLAB_DU_REPO/voyons.git" .
Cloning into '.'...
The authenticity of host '[gitlab.kytes.io]:2222 ([192.168.1.32]:2222)' can't be established.
ECDSA key fingerprint is SHA256:QxdW+6ER6d/DLjGnDtBZ2eRXQNV+tIWfrvizbTykgBg.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '[gitlab.kytes.io]:2222,[192.168.1.32]:2222' (ECDSA) to the list of known hosts.
remote: Enumerating objects: 3, done.
remote: Counting objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
jbl@pc-alienware-jbl:~/test-iaac-kytes$ ls -allh
total 16K
drwxr-xr-x 3 jbl jbl 4.0K Dec 29 16:27 .
drwxr-xr-x 50 jbl jbl 4.0K Dec 29 16:25 ..
drwxr-xr-x 8 jbl jbl 4.0K Dec 29 16:27 .git
-rw-r--r-- 1 jbl jbl 42 Dec 29 16:27 README.md
jbl@pc-alienware-jbl:~/test-iaac-kytes$ cat README.md
# voyons
pr test de l'acces SSH à gitlabjbl@pc-alienware-jbl:~/test-iaac-kytes$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Issue pour traiter un incident sur le gitlab de prod
Je n'arrive pas à faire ce coone :
hors il devrait focntionner sans mot de passe, j'ai bien ajouté ma clé publique dans mon user gitlab, c'est certain. Voilà mon stdout d'erreurs:
J'ai une source qui me dit que :
Donc au final, il faut que je fasse une intervention sur l'infra, pour tester puis ensuite, je versionnerai, et j'appliquerai, avec test backup/restore (ils ne doivent pas avoir de régression).
Intervention test 1
GITLAB_SHELL_SSH_PORT
dans le./docker-compose.yml
de ma recette de provisionde l'infra Kytes.io (en quarantiane pour l'instant, deviendra la nouvelle recette officielle de provision de la production http://gitlab.kytes.io/kytes-it/infra/production/provision-production ). Donc J'ajoute simplement 1 variable d'environnemnt, celle indiquée par ma source :The text was updated successfully, but these errors were encountered: