2014-10-30 38 views
1

我下面就如何发布到Sonatype的布局here指令和我遇到的问题与mvn release:prepare一步。它得到的最高到这一步则档:的Maven插件版在悬挂混帐推

[INFO] Executing: cmd.exe /X /C "git symbolic-ref HEAD" 
[INFO] Working directory: C:\Users\Nicholas\git\Maven-Mule-REST-Plugin 
[INFO] Executing: cmd.exe /X /C "git push [email protected]:NicholasAStuart/Maven-Mule-REST-Plugin.git master:master" 
[INFO] Working directory: C:\Users\Nicholas\git\Maven-Mule-REST-Plugin 

我已经手动运行该命令自己,它要求我的密码,但我假设是什么拖延释放插件。这是一台Windows机器。我怎么能让这个提示我,或者我可以在CLI参数中提供这个给mvn?

+0

注:两个答案适用于Windows机器。 – VonC 2014-10-30 07:24:44

回答

0

按照这些instructions on GitHub为免密码SSH:

第1步:检查SSH密钥

ls -al ~/.ssh 

第2步:生成新的SSH密钥

ssh-keygen -t rsa -C "[email protected]" 
# Creates a new ssh key, using the provided email as a label 
# Generating public/private rsa key pair. 
# Enter file in which to save the key (/c/Users/you/.ssh/id_rsa): [Press enter] 

Enter passphrase (empty for no passphrase): [Type a passphrase] 
# Enter same passphrase again: [Type passphrase again] 

# start the ssh-agent in the background 
ssh-agent -s 
# Agent pid 59566 
ssh-add ~/.ssh/id_rsa 

3步:添加你的SSH密钥到GitHub的

clip < ~/.ssh/id_rsa.pub 
# Copies the contents of the id_rsa.pub file to your clipboard 

第4步:测试所有的东西

ssh -T [email protected] 
# Attempts to ssh to github 
+0

> SSH-添加的〜/ .ssh/id_rsa - 无法打开您的认证代理的连接。 – Brovoker 2015-03-26 15:29:51

+0

@Brovoker如果你使用的是错误信息搜索StackOverflow上你得到直接解决它的问题。 http://stackoverflow.com/questions/17846529/could-not-open-a-connection-to-your-authentication-agent/17848593#17848593 – 333kenshin 2015-03-31 18:10:43

2

行家释放小插件显示像Artifactory的回购经理推动时非SSH安全储存库太(像任何自己的配置HTTP或HTTPS库同样的问题行为)如果你错过了将凭据添加到Maven进程。

所以如果你使用HTTP(S)经常检查您已经添加凭据Maven的过程,作为Maven的发行参数插件像...

mvn release:prepare -Dusername=ANYBODY -Dpassword=XXX 
+0

谢谢!我添加了用户名并按照你的建议传递并解决了问题 – mrh 2016-08-30 06:17:25