Search code examples
gitmacosgithubphpstormwebstorm

Can't push files to GitHub via PhpStorm [MacOs]


I'm trying to configure my PhpStorm to send files to GitHub, but it failed. I can push files via Github Desctop, but I cannot do the same via PhpStorm.

My Github account correctly connected to PhpStorm. I can do checkouts, but I cannot commit and push files

My error:
Push failed: Failed with error: unable to access 'https://github.com/***/***..git/': The requested URL returned error: 403

Tech specs: - Mac OS High Sierra - PhpStorm 2018.1 - GitHub Desktop v1.2.3


Solution

  • Check if you did register a GitHub account in PhpStorm.

    If your GitHub account is using 2FA (2-factor authentication), you would need to configure an Access token first.

    Check also if the wrong credentials are cached in the OSX Keychain.

    Finally, consider switching to an SSH URL if https, for some reason, does not work.