Allow changing and deleting stored credentials
When pushing/pulling over HTTPS, gitg asks for password and allows storing it forever. If the user accidentally uses the wrong GitHub auth token, gitg will successfully login, remember the password forever, and only then it fails to push/pull due to insufficient permissions associated with the token. Since the token is now permanently stored, gitg will not ask for it again and keeps failing on all future push/pull operations.
I think, there are two ways to fix this:
- If push/pull fails with error, clear the stored password and ask for new one.
- Offer UI to list and delete stored credentials.
Both options can be implemented at the same time. The second option is more general as it allows removing and replacing accidentally used auth token that happens to work for now but its use is undesirable for some reason.