Git - can not push to remote server - (401) Unauthorized


  • Hi,

    im using Visual Studio 2015 (Update 3).

    I try to use the Git commands in the Team Explorer tab. The commit works fine on my local repository but a push to the remote server (my own) fails with following error:

    Error encountered while pushing to the remote repository: An error occurred while sending the request.

    Inner Exception:    The remote server returned an error: (401) Unauthorized.

       Inner Exception:        No credentials are available in the security package

    fetch raises the same exception.

    With cmd, bash or SourceTree i can do all i want.

    i hope someone can help.

    regards, Daniel

    • Edited by DataJockey13 Wednesday, January 25, 2017 1:45 PM
    Wednesday, January 25, 2017 1:44 PM

All replies

  • Hi Daniel,

    According to the error message, this issue is caused by the authentication, please make sure you have done two steps:

    1). Make sure VS has been connected with VSTS/TFS.

    2). Please run git config --list to make sure and has been configured. And you need to use git config --global name and git config --global email_address to configure it.

    In addition, the following thread has the similar issue as yours, please refer to it:



    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact

    Thursday, January 26, 2017 8:17 AM