what worked for me was :
Generate an access token in GitHub from Settings → Developer settings → Personal Access Tokens → Classic tokens → Generate New Token and save this token
(Mac)
Open Keychain access and search for github , under github.com (Internet password) under Attributes , update password with new token which we just generated from above step.