简体   繁体   English

Git一直提示我输入SSH密钥 - Ubuntu VM的密码

[英]Git keeps prompting me for passphrase for my SSH Key - Ubuntu VM

I have a repo for my testing site in bitbucket 我在bitbucket有我的测试网站的回购

SSH SSH

git@bitbucket.org:rkim/rkim-app.git

My current git config file 我目前的git配置文件

cat .git/config cat .git / config

[core]
    repositoryformatversion = 0
    filemode = true
    bare = false
    logallrefupdates = true
[remote "origin"]
    url = git@bitbucket.org:rkim/rkim-app.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master
[credential]
    helper = store

git config --list git config --list

user.name=Ryan Kim
user.email=rkim@outlook.com
credential.helper=cache --timeout=3600
core.repositoryformatversion=0
core.filemode=true
core.bare=false
core.logallrefupdates=true
remote.origin.url=git@bitbucket.org:rkim/rkim-app.git
remote.origin.fetch=+refs/heads/*:refs/remotes/origin/*
branch.master.remote=origin
branch.master.merge=refs/heads/master
credential.helper=store

I've tried all the suggestions in here , and still got prompt to enter my passphrase. 我已经在这里尝试了所有的建议,但仍然提示输入我的密码。

git pull git pull

Enter passphrase for key '/root/.ssh/id_rsa': 输入密钥'/root/.ssh/id_rsa'的密码:

Let me know if anything else I can provide. 如果我能提供其他任何东西,请告诉我。

Can someone please put an end to this ? 有人可以结束这个吗?

Anythings elses, I should look into ? 不管怎样,我应该调查一下?

Do I need to restart my SSH service or my VM ? 我是否需要重新启动SSH服务或VM?

Git keeps prompting me for password Git一直提示我输入密码

Enter passphrase for key '/root/.ssh/id_rsa': 

No, it is not password, but passphrase. 不,它不是密码,而是密码。 How did you create that key? 你是怎么创造那把钥匙的? What are you trying to achieve? 你想要实现什么目标?

I am trying to not enter the passphrase all the time. 我试图不要一直输入密码。 – ihue 30 secs ago - 在30秒前ihue

Then you have two possibilities. 那么你有两种可能性。 Remove the passphrase from the ssh key and you will never have to enter the passphrase again: 从ssh密钥中删除密码短语,您将永远不必再次输入密码短语:

ssh-keygen -p -P old_passphrase -N "" -f ~/.ssh/id_rsa

Or temporary cache the passphrase somewhere. 或者在某处临时缓存密码。 For this, there is ssh-agent , which can be started using 为此,有ssh-agent ,可以开始使用

eval `ssh-agent`

and then you can add the key: 然后你可以添加密钥:

ssh-add ~/.ssh/id_rsa

You will be prompted once for the passphrase and then never again during your session. 系统将提示您输入密码,然后在会话期间再次提示您。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM