Could not create directory /var/teamsserver

前端 未结 4 871
春和景丽
春和景丽 2021-02-06 01:20

I\'ve installed os x server (Mavericks) on my mac and would like to add bot. For some reasons my remote repo is located on other external server and I have access to it by usern

相关标签:
4条回答
  • 2021-02-06 02:05

    I experienced a similar issue with scheme action build scripts when attempting to run git commands against a github repo protected by ssh key pairs.

    Bots run builds using a _teamsserver system account. As you've discovered, these accounts don't have home directories by default. To setup builds to access and modify their home directory, I had success with the following (your mileage may vary):

    sudo mkdir /var/teamsserver
    sudo chown -R _teamsserver:_teamsserver /var/teamsserver/
    sudo chmod -R 770 /var/teamsserver/
    

    HTH

    0 讨论(0)
  • 2021-02-06 02:17

    I did 3 things to allow me to get past this, although I'm not sure which of them solved the problem:

    1. Change all git repositories in my project to use the HTTPS rather than SSH (git) version of the url
    2. Disabled SSHStrictHostKeyChecking as per the instructions from the source control log from the bot.
    3. Enabled TrustSelfSignedSSLCertificates as per the same instructions from the log.

    Also check out https://discussions.apple.com/thread/5586872 in case this is a problem for you.

    I will back some of these items off and test when I have more time.

    0 讨论(0)
  • 2021-02-06 02:21

    If you've tried the above and still are getting a permission denied error, you probably don't have the right permissions to that file/directory.

    • Who are you running as? $id
    • $ls -al the directory that the server is trying to read the id_rsa from (Probably similar to this path: Library/Server/Xcode/Data/BotRuns/BotRun-a28db5fc-1932-47a0-a528-f52c75e421e2.b‌​undle/credentials/65885363-194e-454b-a3ce-56dcaaf5d3c9/id_rsa)
    • change ownership of that file ^^ ($sudo chown {#id} {#path})
    0 讨论(0)
  • 2021-02-06 02:25

    Ok, I took some time but I've a solution... Two solutions actually. Ashamed to admit but read and understand logs is enough to solve the problem (again :P).

    FIRST ANSWER:

    My server host key was added to .ssh/known_hosts BEFORE installing os x server. Server does't use that path of known hosts. As log says server uses:

    SSH Known Hosts file path is located at /Library/Server/Xcode/Config/ssh_known_hosts

    and that file was empty in my case. So to solve the problem it is enough to copy known_hosts to ssh_known_hosts:

    sudo cp ~/.ssh/known_hosts /Library/Server/Xcode/Config/ssh_known_hosts
    

    It's that simple.

    SECOND ANSWER:

    Acording to log again

    SSH strict host checking is enabled (you can disable this by editing the SSHStrictHostKeyChecking key in /Library/Server/Xcode/Config/xcsbuildd.plist

    Change SSHStrictHostKeyChecking to false.

    It's done again.

    0 讨论(0)
提交回复
热议问题