I rozwiązać ten problem po tym STEP- kroku instrukcje:
krok 1: Sprawdź kluczy SSH
$ cd ~/.ssh
# Checks to see if there is a directory named ".ssh" in your user directory
# If it says "No such file or directory" skip to step 3. Otherwise continue to step 2.
Krok 2: kopii zapasowych i usunąć istniejące klucze SSH
$ ls
# Lists all the subdirectories in the current directory
# config id_rsa id_rsa.pub known_hosts
$ mkdir key_backup
# Makes a subdirectory called "key_backup" in the current directory
$ cp id_rsa* key_backup
# Copies the id_rsa keypair into key_backup
$ rm id_rsa*
# Deletes the id_rsa keypair
Krok 3: wygenerować nowy SSH klucza
$ ssh-keygen -t rsa -C "[email protected]"
# Creates a new ssh key using the provided email
# Generating public/private rsa key pair.
# Enter file in which to save the key (/home/you/.ssh/id_rsa):
# Enter passphrase (empty for no passphrase): [Type a passphrase]
# Enter same passphrase again: [Type passphrase again]
# Your identification has been saved in /home/you/.ssh/id_rsa.
# Your public key has been saved in /home/you/.ssh/id_rsa.pub.
# The key fingerprint is:
# 01:0f:f4:3b:ca:85:d6:17:a1:7d:f0:68:9d:f0:a2:db [email protected]
Krok 4: Dodaj swój klucz SSH do GitHub
$ sudo apt-get install xclip
# Downloads and installs xclip
$ xclip -sel clip < ~/.ssh/id_rsa.pub
# Copies the contents of the id_rsa.pub file to your clipboard
Następnie przejdź do hithub i zrobić:
- przejdź do Ustawienia konta
- Kliknij „ssh Keys” w lewym pasku bocznym
- Kliknij przycisk „Dodaj klucza SSH”
- Wklej klucz do "klucz" field
- Kliknij przycisk "Dodaj klucz"
- potwierdzić działanie wpisując hasło GitHub
Krok 5: Test wszystko się
$ ssh -T [email protected]
# Attempts to ssh to github
Jeżeli ok, zobaczysz
Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.
inaczej (to się stało ze mną), widać
Agent admitted failure to sign using the key.
# debug1: No more authentication methods to try.
# Permission denied (publickey).
Aby rozwiązać ten problem
$ ssh-add
# Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap]
# Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)
Na oryginalnej informacji
https://help.github.com/articles/generating-ssh-keys
https://help.github.com/articles/error-agent-admitted-failure-to-sign
ssh-add ma rzecz. Jeszcze raz dziękuję ... –
Przepraszam, jak wpisać ścieżkę? moją ścieżką jest folder C: \ Documents and Settings \ admin \ .ssh. jaki jest format wpisywania ścieżki? – Thinkerer
na twoim mac'u zamiast 'sudo apt-get install xclip' możesz potrzebować uruchomić 'brew install homebrew/emacs/xclip-mode' zamiast tego –