Source Control/Git Integration - Authentication failed with "Invalid username or password" error.

When checking in objects and pushing to GiTHub via RedGate Source Control, I get and error do to an invalid username and password on the remote GiTHub repository.

How can I change the my credentials that SourceControl is using to access GitHUB?

Thank You
Tagged:

Answers

  • leevduhlleevduhl Posts: 8 New member
    Update to the above question:
    Redgate SQL Source Control v 7.0.2.8677
    Windows 10
  • To reset the Git credentials try deleting %localappdata%\Red Gate\SQL Source Control 7\Credentials.xml​.
    Have you visited our Help Centre?
  • leevduhlleevduhl Posts: 8 New member
    That does not appear to have worked.  After deleting the file, I still get the error and the "Credentials.xml" file does not get recreated in the "SQL Source Control 7" folder.  I did restart my SSMS/SQL Source Control after deleting the file.
  • I'm interested in the resolution to this too. I've been trying to commit changes from SQL Source Control to a GIT repo in both Azure DevOps and on premise TFS2013 with no success (I've previously been successful using GIT command line). I have no "Credentials.xml​" file and, unlike in a previous answer on the forum, get no option to enter a PAT when pushing to my repo. Any help would be much appreciated as currently out of ideas of how to resolve!

    SQL Source Control v7.0.6.8775 in SSMS v17.4

  • leevduhlleevduhl Posts: 8 New member
    Anyone? Anyone?
  • vetrpavetrpa Posts: 5 New member
    Has anyone found a resolution to this who could chime in?  we are also having the same issue after having our yearly password updates with our work systems.  We have to manually push changes through git outside of RedGate to bypass this for now
  • leevduhlleevduhl Posts: 8 New member
    I have not found one.  I currently use GIT Desktop push my changes after I commit them thru Redgate.
  • vetrpavetrpa Posts: 5 New member
    Hurray, I found a resolution for this!  Well through a response back from RedGate.  I had to reinstall GIT for my Windows.  I did not have to uninstall, just reinstall the latest GIT (which for me is version 2.21.0.windows.1).  Latest version at https://git-scm.com/download/win which automatically downloads.  Then I just ran through the setup and made sure to include the GIT Credential Manager for windows.  After the reinstall, I went back to SQL and clicked to push my source control change. Received a popup (hurray) asking for my credentials and it worked!

    This specifically resolved the message for this issue with me. 

    note: I have a Windows VM running on a Mac..
  • In a few cases we've tracked this down to corrupted environment variables, which reinstalling Git fixes. It's not great but its worth giving a go if you haven't done so already.
    Have you visited our Help Centre?
  • TommyMac501TommyMac501 Posts: 1 New member
    @Russell D's solution worked for me. Thanks!

Sign In or Register to comment.