Deleting password from Keychain in terminal
You may first try to find the credentials (or better the blob):

security find-internet-password -l "github.com"  /Users/user_name/Library/Keychains/login.keychain


Then delete them with:

security delete-internet-password -l "github.com"  /Users/user_name/Library/Keychains/login.keychain


If you have several github.com items you have to repeat this. Create a backup of your login.keychain (or better the whole Keychain folder) before proceeding.