मैं इस समस्या का समाधान इस कदम निम्नलिखित आप इस लाइन /etc/rc.local
में यदि आप लिनक्स के तहत कर रहे रख सकते हैं दर कदम निर्देश:
चरण 1: 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.
चरण 2: बैकअप और हटाने मौजूदा 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
चरण 3: नया SSH कुंजी जेनरेट करें
$ 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]
चरण 4: GitHub
को आपकी SSH कुंजी जोड़ें
$ 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
फिर, hithub पर जाएँ, और कार्य करें: बाएं साइडबार में
- जाओ अपने खाते की सेटिंग्स
- पर क्लिक करें "SSH कुंजियों" करने के लिए
"SSH कुंजी जोड़ें"
- में अपने प्रमुख चिपकाएं
- क्लिक करें "कुंजी" क्षेत्र
- क्लिक करें
- पुष्टि कार्रवाई अपने GitHub पासवर्ड दर्ज करके "कुंजी जोड़ें"
चरण 5: टेस्ट सब कुछ बाहर
$ ssh -T [email protected]
# Attempts to ssh to github
ठीक हैं, तो आप
Hi username! You've successfully authenticated, but GitHub does not
# provide shell access.
अन्यथा देखेंगे (यह मेरे साथ हुआ), तो आपको
Agent admitted failure to sign using the key.
# debug1: No more authentication methods to try.
# Permission denied (publickey).
इस हल करने के लिए देखेंगे
$ ssh-add
# Enter passphrase for /home/you/.ssh/id_rsa: [tippy tap]
# Identity added: /home/you/.ssh/id_rsa (/home/you/.ssh/id_rsa)
मूल जानकारी के लिए
https://help.github.com/articles/generating-ssh-keys
https://help.github.com/articles/error-agent-admitted-failure-to-sign
ssh-add करता है बात। धन्यवाद फिर से ... –
क्षमा करें, आप पथ कैसे इनपुट करते हैं? मेरा पथ सी है: \ दस्तावेज़ और सेटिंग्स \ admin \ .ssh फ़ोल्डर। पथ टाइप करने का प्रारूप क्या है? – Thinkerer
'sudo apt-get install xclip' के बजाय अपने मैक पर आपको –