So, I had the same problem ..... and it was because when us set the personal token in GitHub to set up you Xcode, u also set an expiration date for it and for me the expiration date was over for that particular token.....
To solve the problem
- Create a new personal access token on Github (https://github.com/settings/tokens), make sure to copy it on clipboard
- Go to settings in Xcode then to account, and when u press GitHub on the right side it would ask for your personal token..... paste it