2014-10-30 36 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