Maven - Error Releasing Code to GitHub (Hangs After Push)
来源:互联网 发布:零基础学算法 编辑:程序博客网 时间:2024/05/21 17:55
原文:http://stackoverflow.com/questions/3243755/maven-error-releasing-code-to-github-hangs-after-push
I have run into the same problem and I traced this to the fact that git is requiring a passphrase, but Maven has no way to specify an appropriate passphrase, so the process essentially hangs. Note that this problem is limited to Windows.
The solution is to run ssh-agent. This can be found in C:\Program Files (x86)\Git\bin\
. After you run it, it outputs some environment variables that you need to set. For example:
SSH_AUTH_SOCK=/tmp/ssh-LhiYjP7924/agent.7924; export SSH_AUTH_SOCK;
SSH_AGENT_PID=2792; export SSH_AGENT_PID;
echo Agent pid 2792;
So, you need to place these in your environment:
C:\> set SSH_AUTH_SOCK=/tmp/ssh-LhiYjP7924/agent.7924
C:\> set SSH_AGENT_PID=2792
Then, you will need to add a passphrase for your particular key file. Generally, if you issued a command likegit fetch origin master
for your project, you will get a passphrase prompt like: Enter passphrase for key '/c/Users/Anthony Whitford/.ssh/id_rsa'
-- that is the file that you need to register with the agent. So, the command is:
C:\> ssh-add "/c/Users/Anthony Whitford/.ssh/id_rsa"
It will prompt you for a passphrase, so enter it. You should see an Identity added
message. Now, the agent knows the passphrase so that you will not be prompted to specify it anymore.
If you have multiple instances of command prompts, make sure that each command prompt has the appropriate SSH_AUTH_SOCK and SSH_AGENT_PID environment variables set. You can validate that this is working by running a command like ssh -v git@github.com
and if you DO NOT get prompted for a passphrase, it is working!
Note that when you logoff, the ssh-agent will shut down and so when you log back in or restart your computer, you will need to repeat these steps. My understanding is that your passphrase is stored in memory, not persisted to disk, for security reasons.
- Maven - Error Releasing Code to GitHub (Hangs After Push)
- Releasing Maven projects to Github
- error: failed to push some refs to 'https://github.com/.....'
- error: failed to push some refs to 'git@github.com:
- github error: failed to push some refs to错误解决
- 解决github :error: failed to push some refs to 问题
- Ubuntu hangs with initramfs error after kernel update.
- git push报错error: failed to push some refs to 'git@github.com:
- github中git push origin master出错:error: failed to push some refs to
- git push报错error: failed to push some refs to 'git@github.com:
- 【已解决】github中git push origin master出错:error: failed to push some refs to
- github中git push origin master出错:error: failed to push some refs to
- 【git push报错error: failed to push some refs to 'git@github.com】
- git push报错error: failed to push some refs to 'git@github.com:
- 【skill】push code with github
- git - error: failed to push some refs to 'https://github.com/xuzhezhaozhao/Practice.git' 解决办法
- github commit 报错:error: failed to push some refs to 'https:'错误解决方法
- 解决git error: failed to push some refs to 'git@github.com:
- iphone绘图的几个基本概念CGPoint、CGSize、CGRect、CGRectMake、window(窗口)、视图(view)
- 谈工作
- 系统内置应用
- TCP传文件
- IOS开发中的CGFloat、CGPoint、CGSize和CGRect
- Maven - Error Releasing Code to GitHub (Hangs After Push)
- android 触摸手势 OnGestureListener
- MySQL 获取表字段的详细信息,如长度等
- grub新手指南
- 1到n的全排列实现
- ls -bash: ls: command not found
- Windows远程关闭局域网内的计算机
- graph cut
- 关系和纽带:六度分割理论【存疑2处】