张晓风
张晓风

Reputation: 1

Set git userName in IDEA

I want to use git in IDEA. My computer has been used by my colleagues. Every time I push my code it, prompts me to enter the password. I had set git config --global user.userName *** but in IDEA, the userName did not change.

I've been trying to solve the problem for three hours and it's not working. Is there a file where I can set my git userName in IDEA?

Upvotes: 0

Views: 120

Answers (1)

Nafeez Abrar
Nafeez Abrar

Reputation: 1075

Maybe you have mistyped the config key. It will be user.name not user.userName

And IDEA asking for a password because you have added HTTP(s) URL as your remote. You can change it with SSH URL and add your SSH-KEY in the Server.

To see all of your remotes

git remote -v

To delete one remote

git remote remove <REMOTE_NAME>

If your REMOTE_NAME is origin the command will be

git remote remove origin

To add a git URL as remote

git remote add <REMOTE_NAME> <URL>

if your REMOTE_NAME is origin and URL is [email protected]:git/git.git the command will be

git remote add origin [email protected]:git/git.git

Upvotes: 1

Related Questions