Okay, let’s face it, your chances are not very good unless you happen to meet one of the following criteria:

  1. You use SourceTree or Tower and use OAuth for authentication.
  2. You want to Push to a Team Repo.
  3. The Team Repo did not make any third party licensing changes.

So, you’re going to have, even though you’re supposed to have permissions, you’re going to have no permissions when you Push, like me

Pushing to https://github.com/SwiftOldDriver/iOS-Weekly.git
remote: Permission to SwiftOldDriver/iOS-Weekly.git denied to olddonkey.
fatal: unable to access 'https://github.com/SwiftOldDriver/iOS-Weekly.git/': The requested URL returned error: 403
Copy the code

However, at this point you can successfully Push with the command line. So it’s an endless cycle of trying to figure out what’s wrong with SourceTree.

However, the goose…

This is not a problem with your SourceTree Settings.

The problem is that your account is authorized by OAuth, and the Github account authorized by OAuth is restricted by the Access Control of the team account.

Solutions:

  1. Authorize SourceTree in your OAuth App:

    1. Open https://github.com/settings/applications
    2. Find SourceTree for authorization
  2. Use links: https://help.github.com/articles/disabling-oauth-app-access-restrictions-for-your-organization/ for the Team the access of the account Control changes to allow SourceTree

Just do one of the two.

I hope you didn’t fall into this hole like ME.