Search code examples
macosgitgithubsshgithub-for-mac

Cannot Sync to Github, previous user still holds sync functionality


At work I recently switched to a Mac that was previously used by a freelancer (long since left). I downloaded and logged into Github for Mac, cloned the current Repo to desktop and coded away, after committing several times I went to sync and it returned:

"You may not have permission to access superTween. Check Preferences to make sure you’re still logged in."

Upon further investigation a git push through Terminal returned:

remote: Permission to {{current repo}}.git denied to {{freelancers email}}.

fatal: unable to access '{{current repo}}.git/': The requested URL returned error: 403

So clearly the previous user hadn't signed out properly? either way I logged out and in again via the app. still no luck, generated a new SSH key with my login... nothing, clean reinstall of github (using this code).... still nothing.

However, the terminal also shows this:

$ ssh -T [email protected] Hi {{myuserName}}! You've successfully authenticated, but GitHub does not provide shell access.

How do I remove the previous user who is attaching themselves to my sync settings?


Solution

  • Fixed, the issue was that my OS had a saved keychain from the previous user for the github web-login which was for some reason taking priority. Process for fixing was:

    delete keychain re-run git removal re-generate ssh key install and login as normal

    edit: reply from github help:

    If you're using an HTTPS remote URL, your SSH key won't be used. If you're not prompted for your GitHub credentials when accessing GitHub over HTTPS, this means they're cached locally.

    You'll need to open the Keychain Access application and search for any "github" entries to double-check that the correct credentials are entered.

    thanks everybody for your help