Git为每次推送输入长密码 [英] Git enter long passphrase for every push
本文介绍了Git为每次推送输入长密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
git@github.com:...
,之后它需要密码。有没有一种方法可以自动执行此操作? 我正在使用Linux Ubuntu。
解决方案
您可以使用 ssh-agent
记住您的密码(Gnome会自动为您运行,通常为...)。
$ ssh-agent bash
$ ssh-add
输入/home/elyobo/.ssh/id_rsa的密码短语:
Identity添加:/home/elyobo/.ssh/id_rsa(/home/elyobo/.ssh/id_rsa)
从现在开始,从终端内部运行此操作,您的密码短语将被记住。
理想情况下,您会自动运行它,因此所有运行的shell侏儒会工作;请查看 Gnome Keyring 。
Every time I try to push anything to GitHub it asks me the address git@github.com:...
and after that it wants the passphrase. Is there a way to automate this?
I am using Linux Ubuntu.
解决方案
You can use ssh-agent
to remember your passphrase (Gnome automatically runs this for you, normally...).
$ ssh-agent bash
$ ssh-add
Enter passphrase for /home/elyobo/.ssh/id_rsa:
Identity added: /home/elyobo/.ssh/id_rsa (/home/elyobo/.ssh/id_rsa)
From now on, from within the terminal that you run this, your pass phrase will be remembered.
Ideally you'd get it working automatically, so all shells running within gnome would work; check out Gnome Keyring.
这篇关于Git为每次推送输入长密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文