Join me in the free webinar on CRUD operations in Angular 2

Infragistics brings you another webinar in India time zone. This time, we are hosting it on 8th September at 3 PM. In this webinar we will cover CRUD operations in Angular 2.

Free register to attend the webinar

In the webinar, we will cover following topics

  • Components
  • Routings
  • Services
  • Forms and Validations

We will use Visual Studio Code as IDE and TypeScript as language to develop the application.

Register here to join the webinar

Also in advance you can download the sample code of the application from the webinar here

Feel free to clone it and play around. Hope to see you in the webinar.

Git command is taking wrong user? To solve – check CredentialManager

Yes, this was a strange scenario for me. I created Angular 2 project in Visual Studio Code and wanted to push the project into a GitHub Repository. Sounds a simple requirement right? So to publish the project to a GitHub Repository, I ran following 5 commands in the order given below:

  1. git init
  2. git add –A
  3. git commit –m “commitmessage”
  4. git remote add origin “Url of GitHub Repo”
  5. git push origin master

For the push command, I got the error as shown in the image below. Focus on error message for user djinfragistics


Error message is very clear that user djinfragistics does not have access to the remote repository hence HTTP Error code 403 is returned from the GitHub server.

To check current user name for the project I ran the command

  1. git config
  2. git config

As shown in the image below, I found username and user email was set to the user which had access to remote repository.


I was confused and was not able to figure it out that why git command is not taking user from the current project and taking some random user djinfragistics. I thought might be global user is set to djinfragistics. So, to check that I ran the command as below

  1. git config –global
  2. git config –global

As shown in the image below, I found username and user email was set to the user which had access to remote repository.


It was strange, that global user is also set to the different user, however to publish project, git was taking some strange user djinfragistics from somewhere.

After bit of researching, I found that on windows when we install git 2, Credential Manager also gets installed. It runs as a daemon process and caches the git user credentials, such that each time we do not have to provide user information to push the changes to GitHub repository.

In my scenario, I might have used djinfragistics username earlier on the same system and that user got cached in Credential Manager. So even though user was set to debugmode, on running the command git was taking user djinfragistics from credential manager.

To check various options, run the command as shown below

  • git credential-manager

Above command will show us all options of credential manager. I was lazy and wanted to publish project as early as possible, so I ran

  • git credential-manager uninstall


The above command will uninstall credential manager and we will have to provide git user credential each time. I would recommend you to explore various options and edit the file rather uninstalling it.

It solved my problem and git command started taking correct user name. I hope it helps.