skip to Main Content

I am struggling to get my Xcode Server working using Xcode 14.2
It used to work, but since having to reset everything I keep getting the error:

Authentication failed because the credentials were missing

I’ve tried starting from scratch by deleting all Xcode entries from my keychain.

I’ve created an rsa SSH key as documented here

The cert has been added to my GitHub account as documented here

When I click Edit Bot... in Xcode and select the Repositories tab it successfully loads my repo. Yet when I click to Integrate the bot, it fails with the auth error.

I’ve tried adding this to my GitHub config but it makes no difference:

[url "ssh://[email protected]/"]
 insteadOf = https://github.com/

What else could I try?

3

Answers


  1. I’ve tried starting from scratch by deleting all Xcode entries from my keychain.

    But this thread mentions:

    SSH has access to the system keychain so I copied my certificate from the login keychian to the system keychain and that is that.

    So check if you need to update your key in the system part of the keychain as well:

    KeyChain

    The OP confirms in the comments that cleaning up the keychain helped.

    Login or Signup to reply.
  2. It seems like you’ve already tried a few steps to resolve the issue. Here are some additional suggestions you can try to fix the authentication error:

    Ensure your SSH key has been added to the ssh-agent:
    First, start the ssh-agent in the background:

    eval "$(ssh-agent -s)"
    

    Next, add your private SSH key to the ssh-agent:

    ssh-add ~/.ssh/id_rsa
    

    Replace id_rsa with the name of your private key file if it’s different.

    Make sure that your SSH key is properly configured in your Xcode bot:

    • Open your bot settings in Xcode.
    • Go to the "Repositories" tab.
    • Click on the repository, and then click the "Settings" button.
    • In the "Authentication" section, select "SSH Keys" and add your private key file.
    • Double-check your Xcode server’s Git configuration:
    • Go to Xcode Preferences (Cmd + ,)
    • Select the "Accounts" tab.
    • Find your GitHub account, and click on it.
    • Click on the "Manage Certificates…" button.
    • Check if there’s a valid SSH key for your account. If not, click on the "+" button and add the SSH key.
    • Make sure your bot has access to the correct branch:
    • Open your bot settings in Xcode.
    • Go to the "Configuration" tab.
    • Ensure that the correct branch is selected under the "Source Control" section.
    • Check your GitHub repository’s SSH URL:
    • Ensure that your GitHub repository is using the correct SSH URL. You can find this URL by going to your repository on GitHub, clicking the "Code" button, and selecting "SSH" under "Clone".
    • Compare this URL with the one in your Xcode bot settings.

    If you’ve tried these steps and are still encountering issues, you may want to consider filing a bug report with Apple or seeking help from the Apple Developer Forums, as the issue could be related to Xcode itself.

    Login or Signup to reply.
  3. This issue has become a major effort to handle when trying to acquire the proper authentication credentials but unfortunately there has yet to be any successful ssh commands to apply the necessary authentication credentials in the diagram shown of the keychain access. And yes for almost each keychain needed for your docs or apps, etc will need to be done this way as well.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search