SSH密钥 - 仍然要求输入密码和密码 [英] SSH Key - Still asking for password and passphrase

查看:138
本文介绍了SSH密钥 - 仍然要求输入密码和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我克隆一个存储库时,我一直在与Github进行一些贴心的工作,总是询问我的用户名和密码。我想绕过这一步,因为这是我工作流程中的烦恼。



我尝试使用本指南设置一个SSH密钥(我成功完成)。 https://help.github.com/articles/generating-ssh-keys ,我成功了。



我的问题是,在克隆存储库时(使用SSH),仍然需要我的github密码和密码。我的理解是,在设置这个SSH密钥后,我不再需要这样做。



我有点不确定要问什么,所以我只会声明我的目标。


我希望能够克隆版本库,而无需一直放入我的Github信息


我用SSH密钥丢失了什么?如果任何人都可以提供一些指导或资源,我将不胜感激,因为在GitHub中进行SSH身份验证时,我一直觉得有点失落。



据我所知,这是一个命令,测试是否正常工作,这里是我的控制台输出:

 〜$ ssh -T git @ github.com 
将密码保存至钥匙串失败
输入密钥'/Users/MYNAME/.ssh/id_rsa'的密码:
您好!MYNAME!您已成功通过身份验证,但GitHub不提供shell访问权限。

当我输入密码时,应该先失败吗?然后,当我输入我的密码短语时,它就会通过。

如果您使用 HTTPs SSH c>克隆/设置遥控器时。然后确保你有一个ssh-agent来记住你的密码。这样,您只能通过终端会话输入一次密码。



如果仍然太烦人,那么只需设置一个不带密码的ssh-key。


I've been somewhat 'putting up' with Github always asking for my username and password when I clone a repository. I want to bypass this step because it is an annoyance within my workflow.

I tried setting up an SSH key (which I successfully did) using this guide. https://help.github.com/articles/generating-ssh-keys and I was successful.

My problem is that I am still asked for my github password and passphrase when cloning a repository (using SSH). My understanding was that after I set up this SSH key, I would no longer have to do that.

I am a little unsure what to ask, so I will just state my goal.

I want to be able to clone repositories without having to put in my Github information all the time.

What am I missing with my SSH key? If anyone can provide some guidance or resources I would appreciate it, because I've always felt a little lost when it came to SSH authentication in GitHub.

From my knowledge, this is a command that tests if things are working properly, here are the output from my console:

~ $ ssh -T git@github.com
Saving password to keychain failed
Enter passphrase for key '/Users/MYNAME/.ssh/id_rsa':
Hi MYNAME! You've successfully authenticated, but GitHub does not provide shell access.

When I input my password, should that fail first? Then, when I enter my passphrase, it passes.

解决方案

If you work with HTTPs urls, it'll always ask for your username / password.

If you're correctly using SSH when cloning / setting remotes. Then make sure you have a ssh-agent to remember your password. That way, you'll only enter your passphrase once by terminal session.

If it is still too annoying, then simply set a ssh-key without passphrase.

这篇关于SSH密钥 - 仍然要求输入密码和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆