Maven - Error Releasing Code to GitHub (Hangs After Push)

简介:

原文: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.


相关文章
|
2月前
|
缓存 网络协议 Linux
百度搜索:蓝易云【解决github push/pull报错443】
通过以上方法,你有望解决GitHub push/pull报错443的问题。如果问题仍然存在,建议检查GitHub的状态页面,看是否有正在维护或故障的情况。
81 3
|
9月前
|
存储 开发工具 git
使用 git push 上传超过100MB文件报错 remote: error: this exceeds GitHub‘s file size limit of 100.00 MB
Git 大文件存储(LFS)用 Git 中的文本指针替换音频示例、视频、数据集和图形等大文件,同时将文件内容存储在 GitHub.com 或 GitHub Enterprise 等远程服务器上。
176 0
|
4月前
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
【Error】fatal: unable to access ‘https://github.com/PanJiaChen/vue-element-admin/‘: OpenSSL SSL_read:
|
Shell 开发工具 数据安全/隐私保护
解决git clone与git push出现的若干问题:Failed to connect to github.com port 443: Timed out
解决git clone与git push出现的若干问题:Failed to connect to github.com port 443: Timed out
4846 1
解决git clone与git push出现的若干问题:Failed to connect to github.com port 443: Timed out
|
6月前
|
缓存 Shell 网络安全
Github-推送代码报错“error:RPC failed;curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL,errno 10054”解决方案
Github-推送代码报错“error:RPC failed;curl 56 OpenSSL SSL_read: SSL_ERROR_SYSCALL,errno 10054”解决方案
108 0
|
8月前
GitHub的PUSH显示网络超时,小乌龟网络代理办法
GitHub的PUSH显示网络超时,小乌龟网络代理办法
146 0
|
8月前
|
JavaScript 开发工具 git
vscode关于vue项目无法将文件push到github的错误命令
vscode关于vue项目无法将文件push到github的错误命令
71 0
|
9月前
|
网络协议
出现“Could not resolve host: www.github.com; Unknown error”错误解决
出现“Could not resolve host: www.github.com; Unknown error”错误解决
387 0
|
10月前
|
开发工具 git
【经验分享】【Github】Error: Action failed with “The process ‘/usr/bin/git‘ failed with exit code 128“
【经验分享】【Github】Error: Action failed with “The process ‘/usr/bin/git‘ failed with exit code 128“
212 0
|
存储 Shell 开发工具
GitHub git push超过100MB大文件失败(write error: Broken pipe)完美解决
GitHub git push超过100MB大文件失败(write error: Broken pipe)完美解决
1122 0
GitHub git push超过100MB大文件失败(write error: Broken pipe)完美解决