Maison  >  Questions et réponses  >  le corps du texte

window 下 设置 github ssh

Administrator@WIN-9PH4ISN44NM MINGW64 /e/zan/www/gitpages
$ cd ~/.ssh

Administrator@WIN-9PH4ISN44NM MINGW64 ~/.ssh
$ ls
github_rsa  github_rsa.pub  id_rsa  id_rsa.pub  known_hosts

Administrator@WIN-9PH4ISN44NM MINGW64 ~/.ssh
$ rm *

Administrator@WIN-9PH4ISN44NM MINGW64 ~/.ssh
$ ls

Administrator@WIN-9PH4ISN44NM MINGW64 ~/.ssh
$ cd ~

Administrator@WIN-9PH4ISN44NM MINGW64 ~
$ ssh-keygen -t rsa -C "root@zanjs.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/Administrator/.ssh/id_rsa.
Your public key has been saved in /c/Users/Administrator/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:gAYTmJ1qwewql+O+7gRm/kquVfseC8cz2WRNA9tCZfM root@zanjs.com
The key's randomart image is:
+---[RSA 2048]----+
| **o   .*.       |
|+oo= . . *       |
|. * o . o E      |
| = o   . + .     |
|ooo .   S .      |
|++ . o =         |
| o+ o B .        |
|oo.. + =         |
|o==. .+          |
+----[SHA256]-----+

Administrator@WIN-9PH4ISN44NM MINGW64 ~/.ssh
$ git config --global user.name "zanjs"

Administrator@WIN-9PH4ISN44NM MINGW64 ~/.ssh
$ git config --global user.email "root@zanjs.com"

$ ssh -T git@github.com
The authenticity of host 'github.com (192.30.252.131)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'github.com,192.30.252.131' (RSA) to the list of known hosts.
Enter passphrase for key '/c/Users/Administrator/.ssh/id_rsa':
Hi zanjs! You've successfully authenticated, but GitHub does not provide shell access.

如上 操作 看最后一句话 but GitHub does not provide shell access

这个对 在 git push 的时候有影响吗

ringa_leeringa_lee2727 Il y a quelques jours557

répondre à tous(6)je répondrai

  • 仅有的幸福

    仅有的幸福2017-05-02 09:27:29

    La clé générée par ssh-keygen est uniquement utilisée pour accéder à la bibliothèque distante git sous forme ssh, et ne peut pas être utilisée pour une connexion ssh rapide sous le shell sans nom d'utilisateur et mot de passe

    répondre
    0
  • 巴扎黑

    巴扎黑2017-05-02 09:27:29

    Il est recommandé d'utiliser GitExtensions

    répondre
    0
  • 仅有的幸福

    仅有的幸福2017-05-02 09:27:29

    不会影响。參考:
    Git - Documentation git-shell

    DESCRIPTION
    Il s'agit d'un shell de connexion pour les comptes SSH afin de fournir un accès Git restreint. Il permet l'exécution uniquement de commandes Git côté serveur implémentant la fonctionnalité pull/push, ainsi que de commandes personnalisées présentes dans un sous-répertoire nommé git-shell-commands dans le répertoire personnel de l'utilisateur.

    EXEMPLE
    Pour désactiver les connexions interactives, en affichant un message d'accueil à la place :

    $ chsh -s /usr/bin/git-shell
    $ mkdir $HOME/git-shell-commands
    $ cat >$HOME/git-shell-commands/no-interactive-login <<\EOF
    #!/bin/sh
    printf '%s\n' "Hi $USER! You've successfully authenticated, but I do not"
    printf '%s\n' "provide interactive shell access."
    exit 128
    EOF
    $ chmod +x $HOME/git-shell-commands/no-interactive-login

    répondre
    0
  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-02 09:27:29

    Cela n’affectera pas.
    but GitHub does not provide shell access signifie que le serveur github ne fournit pas de shell pour empêcher les opérations malveillantes sur le serveur, et cela n'affectera pas git push.

    répondre
    0
  • PHP中文网

    PHP中文网2017-05-02 09:27:29

    Exécutez le prochain client Github et ce sera normal. .

    répondre
    0
  • 天蓬老师

    天蓬老师2017-05-02 09:27:29

    Non, car l'environnement Windows ne prend pas en charge le shell, mais cela n'affecte pas l'utilisation de git push

    répondre
    0
  • Annulerrépondre