OS X Server - bot can't get source from repository

前端 未结 2 2008
一整个雨季
一整个雨季 2021-02-04 15:57

I had a previous version of OS X Server set up and running fine, but when I installed the upgrade to 3.2.1, I found that none of my bots would work correctly. These are the issu

相关标签:
2条回答
  • 2021-02-04 16:13

    I've solved this problem in the most convoluted way imaginable!

    When OS X Server connects to the repository to download the source, it uses the Xcode library. Xcode uses libgit2 to do the downloading which had a known bug which caused the buffer error. It was fixed in v0.21.2, but the latest Xcode (6.1.1) only uses v0.21. That previous Xcode version only used v0.20, so hopefully a future Xcode release will use v0.21.2+ in which case this fix shouldn't be necessary.

    Anyway, the solution for Xcode 6.1.1 was to:

    1. Download and unzip the version of gitlib used by Xcode from here: https://github.com/libgit2/libgit2/releases/tag/v0.21.0
    2. Make the changes to src/transports/http.c as detailed here: https://github.com/libgit2/libgit2/commit/7d729d0bfd897e8685099b160b6dbfd7f4ebd588
    3. Save the http.c file
    4. Build your edited version of gitlib2 using the instructions here, i.e:

      • Download CMake
      • Run the following commands in Terminal after navigating to your unzipped libgit2-0.21.0 folder:

        $ mkdir build && cd build

        $ cmake ..

        $ cmake --build .

    5. In Finder on your server, go to the Applications folder, right-click on Xcode and select "Show Package Contents". Go to the Contents/Developer/usr/lib folder and rename the 'libgit2.dylib' file to 'libgit2.dylibold' or similar.

    6. Take the newly created 'libgit2.0.21.0.dylib' file from the libgit2-0.21.0/build folder, rename it to 'libgit2.dylib' and copy it into the /Applications/Xcode/Contents/Developer/usr/lib folder on your server.

    7. Restart OS X Server, and integrate your bot again from Xcode.

    0 讨论(0)
  • 2021-02-04 16:17

    The remote repository will be added when you create a bot. You don't have to add repository in OSX server.

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