2013-05-07 18 views
1

我一直無法使用Jenkins CLI WAR登錄到我們的Dev @ Cloud實例。每次嘗試時,我都會收到以下消息:爲什麼Jenkins CLI不能在我們的Dev @ Cloud實例上工作?

您必須通過身份驗證才能訪問此Jenkins。

我的SSH密鑰在我們的Jenkins實例和GrandCentral中都被設置。我已經嘗試執行登錄命令,但我最終有以下例外:

org.acegisecurity.userdetails.UsernameNotFoundException: Not Found or Not Authorized 
    at com.cloudbees.jenkins.plugins.dacsecurity.auth.CloudBeesUserDetailsService.loadUserByUsername(CloudBeesUserDetailsService.java:60) 
    at com.cloudbees.jenkins.plugins.dacsecurity.auth.CloudBeesUserDetailsService.loadUserByUsername(CloudBeesUserDetailsService.java:12) 
    at hudson.security.SecurityRealm.loadUserByUsername(SecurityRealm.java:305) 
    at hudson.cli.ClientAuthenticationCache.set(ClientAuthenticationCache.java:94) 
    at hudson.cli.LoginCommand.run(LoginCommand.java:37) 
    at hudson.cli.CLICommand.main(CLICommand.java:229) 
    at hudson.cli.CliManagerImpl.main(CliManagerImpl.java:92) 
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
    at java.lang.reflect.Method.invoke(Unknown Source) 
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.perform(RemoteInvocationHandler.java:275) 
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:256) 
    at hudson.remoting.RemoteInvocationHandler$RPCRequest.call(RemoteInvocationHandler.java:215) 
    at hudson.remoting.UserRequest.perform(UserRequest.java:118) 
    at hudson.remoting.UserRequest.perform(UserRequest.java:48) 
    at hudson.remoting.Request$2.run(Request.java:326) 
    at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:72) 
    at hudson.cli.CliManagerImpl$1.call(CliManagerImpl.java:63) 
    at hudson.remoting.InterceptingExecutorService$2.call(InterceptingExecutorService.java:95) 
    at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source) 
    at java.util.concurrent.FutureTask.run(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) 
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) 
    at java.lang.Thread.run(Unknown Source) 

任何幫助這一個表示讚賞。

回答

0

這可能是在連接時沒有使用正確的ssh密鑰的情況 - 它會查看〜/ .ssh/id_rsa等 - 與「ssh」命令相同。

如果仍然不能工作了 - 請不要開罰單[email protected],你可能需要更具體談一下您的設置

你可能需要把在〜/項。 SSH /配置,如:

Host account.ci.cloudbees.net                                           
    IdentityFile ~/.ssh/id_rsa 

指向你想用它來識別(如果您使用您的用戶默認一個你應該確定)私鑰

+0

帳戶。它與此合作。 – highvoltage 2013-05-08 03:34:44

1

試試這個

java -jar jenkins-cli.jar -s「https:// [username] .ci.cloudbees.com /」-i〜/ .ssh/id_rsa help

如果你沒有創建ssh密鑰,幫助指導,直到第三步 https://help.github.com/articles/generating-ssh-keys

[email protected] =可以是任何電子郵件,一定是你在cloudbee賬號登錄給我用相同的ID我的CloudBees生成一個新的.ssh關鍵一個不/設置

相關問題