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.

时间: 2024-09-16 21:50:31

Maven - Error Releasing Code to GitHub (Hangs After Push)的相关文章

添加Android Common Lib及Google Code和Github如何拉取代码

1.Github拉代码 Github只提供git方式管理代码.TrineaAndroidCommon在Github上地址为https://github.com/Trinea/AndroidCommon,欢迎Star或Fork^_*   根据需要选择http地址或是git地址,用shell命令或是tortoiseGit等客户端拉取.如下图: Github提交代码可以参考这篇博客:http://www.cnblogs.com/zdz8207/archive/2012/04/27/git-github

利用github搭建个人maven仓库

缘起 之前看到有开源项目用了github来做maven仓库,寻思自己也做一个.研究了下,记录下. 简单来说,共有三步: deploy到本地目录 把本地目录提交到gtihub上 配置github地址为仓库地址 配置local file maven仓库 deploy到本地 maven可以通过http, ftp, ssh等deploy到远程服务器,也可以deploy到本地文件系统里.例如: <distributionManagement> <repository> <id>h

【maven 报错】maven项目执行maven install时报错Error assembling WAR: webxml attribute is required (or pre-existing WEB-INF/web.xml if executing in update mode)

  在使用maven新建的web项目中,执行   执行如上的这两个操作,报错: 1 [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.5.1:compile (default-compile) on project bioligyInfo: Fatal error compiling: tools.jar not found: C:\Program Files\Java\jre1.8.0

如何设计一门编程语言(六) exception和error code

我一直以来对于exception的态度都是很明确的.首先exception是好的,否则就不会有绝大多数的语言都支持他了.其次,error code也没什么问题,只是需要一个前提--你的语言得跟Haskell一样有monad和comonad.你看Haskell就没有exception,大家也写的很开心.为什么呢?因为只要把返回带error code结果的函数给做成一个monad/comonad,那么就可以用CPS变换把它变成exception了.所以说CPS作为跟goto同样基本的控制流语句真是当

Spring整合Mongodb,Maven的依赖,Spring配置,MongoDB的公共操作类,使用SpringMVC的Controller进行测试并返回结果的案例

在和Spring和MongoDB进行整合的时候需要如下三个jar,分别是: spring-data-commons spring-data-mongodb mongo-java-driver 下面讲解Spring和MongoDB2.x进行整合的Spring配置(下面案例以下面的方式进行说明:) Maven的Pom文件的配置如下: <dependency> <groupId>org.springframework.data</groupId> <artifactId

利用Travis CI 让你的github项目持续构建(Node.js为例)

      Travis CI 是目前新兴的开源持续集成构建项目,它与jenkins,GO的很明显的特别在于采用yaml格式,简洁清新独树一帜.目前大多数的github项目都已经移入到Travis CI的构建队列中,据说Travis CI每天运行超过4000次完整构建.对于做开源项目或者github的使用者,如果你的项目还没有加入Travis CI构建队列,那么我真的想对你说out了.       下面是本人的构建历史:       搭建Travis CI build,需要你有个github账号

github上-Adroid Studio无法找到maven_push.gradle文件

问题描述 Adroid Studio无法找到maven_push.gradle文件 Error:(32, 0) Could not read script 'C:Studysmarthome+SmartHome+maven_push.gradle' as it does not exist. Adroid Studio将GitHub上的开源项目导入时无法找到maven_push.gradle文件 解决方案 参考[Maven Error](https://github.com/balysv/mat

【代码管理】GitHub超详细图文攻略 - Git客户端下载安装 GitHub提交修改源码工作流程 Git分支 标签 过滤 Git版本工作流

找到一篇很详细的Git教程,真的很不错,推荐!!! GitHub操作总结 : 总结看不明白就看下面的详细讲解. . 作者 :万境绝尘  . GitHub操作流程 : 第一次提交 :   方案一 : 本地创建项目根目录, 然后与远程GitHub关联, 之后的操作一样; -- 初始化git仓库 :git init ; -- 提交改变到缓存 :git commit -m 'description' ; -- 本地git仓库关联GitHub仓库 : git remote add origin git@g

git/github学习笔记

1. git 版本控制系统 相比CVS\SVN优势: - 支持离线开发,离线Repository - 强大的分支功能,适合多个独立开发者协作 - 速度块 ps:关于git的更详细的介绍于优点在此就不介绍了,教大家怎么用是关键.:) ==============运行环境======== 系统:windows git : Git-1.7.3.1-preview20101002.rar  下载地址:http://d.download.csdn.net/down/3169511/z_y_liu89 ==