GitHub account unavailable on Xcode 10.2 I noticed a strange behaviour in my Xcode (v10.2, running on a 2016 MacBook Pro with macOS 10.14.4). I have most of my projects under source control with a local Git repository. I then create a remote to GitHub via Xcode and commit and push from the source control menu.

Since yesterday every time I committed I got asked for my username and password. At first I thought it was something normal due to some connectivity issue but then the issue persisted and, going to Xcode Preferences > accounts I noticed that my GitHub account was greyed out and, upon selecting it (or trying to) the right side of the window showed this message:

Account Unavailable Your account details could not be loaded because Accountname support is currently unavailable

At this point it is impossible to remove my GitHub account from Xcode in order to add it once more and it is also impossible to add any source control account, as if something with version control in general would be very broken. I thought it an issue with my SSH key for GitHub so I went on and scrapped the old one and generated a new one. The account stayed on "Loading" for a good minute and then the same message presented itself once more.

I really have no idea what to do here.

What is causing this and how do I get out of it?
This is kind of a tough one to search for but I did find this SO Q&amp;A titled: Xcode source control wrong username on github
. There's an answer there that shows the use of a CLI tool called xcrun to manipulate your Github credentials that are stored in Xcode, for eg:

$ xcrun git config --local user.name 'new_user_name'
$ xcrun git config --local user.email 'new@email.com'


Might help with getting your issue sorted out.

Xcode 10

I was also able to find reports of people having the same issue as you where their source repos (Bitbucket, Github, etc) were greyed out in Xcode. For eg:



This reddit thread titled: Add GitHub account greyed out on Xcode 10, can't fix mentions this process for manually deleting out the creds. This appears to be a issue with Xcode 10 itself.


  Happened to me, this is the only thing that worked (from StackOverflow):
  
  
  Make screenshots of the custom preference settings
  Delete /Applications/Xcode
  Delete all files containing com.apple.dt
  in ~/Library/Caches
  Delete all files containing com.apple.dt
  in ~/Library/Preferences
  Open App Store.app, download and re-install Xcode.
  Create the Apple ID developer account
  
  
  After those steps all account types were enabled and I could create the GitHub account. Finally restore your custom preference settings from the screenshots.


References


Xcode add Github account not possible