osx - Starting jenkins connection as jenkins -


I think this is a very easy question but the solution can not be found anywhere. I do not run my Jenkins Plist file (or just .jar file) as Jenkins, as an administrator. My file looks like this now:

  & lt; Key & gt; Label & lt; / Key & gt; & Lt; String & gt; Com.example.ci & lt; / String & gt; & Lt; Key & gt; ProgramArguments & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; Sudo & lt; / String & gt; & Lt; String & gt; / Usr / bin / java & lt; / String & gt; & Lt; String & gt; -Djava.awt.headless = true & lt; / String & gt; & Lt; String & gt; Jar & lt; / String & gt; & Lt; String & gt; /Users/Shared/Jenkins/Home/slave.jar< / String & gt; & Lt; String & gt; -jnlpUrl & lt; / String & gt; & Lt; String & gt; Http: // [adres] /slave-agent.jnlp & lt; / String & gt; & Lt; String & gt; -secret & lt; / String & gt; & Lt; String & gt; 841557 and 784ead7secret [334b3ac76fe1618e375 & lt; / String & gt; & Lt; / Array & gt; & Lt; Key & gt; KeepAlive & lt; / Key & gt; & Lt; True /> & Lt; Key & gt; StandardOutPath & lt; / Key & gt; & Lt; String & gt; /Users/Shared/Jenkins/Home/stdout.log< / String & gt; & Lt; Key & gt; StandardErrorPath & lt; / Key & gt; & Lt; String & gt; /Users/Shared/Jenkins/Home/error.log< / String & gt;  

I was trying to add command to switch to Jenkins:

sudo su jenkins

So I tried adding something like this:

  & lt; Key & gt; Jenkins user & lt; / Key & gt; & Lt; String & gt; What.to.put.here & lt; / String & gt; & Lt; Key & gt; OtherArguments & lt; / Key & gt; & Lt; Array & gt; & Lt; String & gt; Sudo & lt; / String & gt; & Lt; String & gt; Su & ​​lt; / String & gt; & Lt; String & gt; Jenkins & lt; / String & gt; & Lt; / Array & gt;  

Before the rows given above, but as I have seen that I am still not logged in as Jenkins when I do this from the command line with the command line I wrote - it works, but I want to run it on system startup.

Edit:

After the answer I added Gage :

  Lt; Key & gt; Username & lt; / Key & gt; & Lt; String & gt; Jenkins & lt; / String & gt;  

But I still do not have permission for the directory for which Jenkins is a user.

Comments