问题
Authentication login/username for my GIT account changed. How do I tell this to my IntelliJ product?
回答1:
GIT record login-name in remote repository URL. You can change that in IntelliJ product in couple of ways.
Quick way
- Type CTRL + SHIFT + A to open Enter action or option name dialog
- Type Remotes... to filter the list as in image
- Select Remotes... for Git (first selection on image) and following dialog is openede
- In Git Remotes dialog, use pencil icon to open Define Remote dialog
- Press OK to confirm
- Re-enter your password and optionally have IntelliJ store it.
Point and Click way
- Select VCS menu
- Hover on Git menu item
- Select from sub-menu Remotes...
- Continue as described above
Terminal way
- Open Terminal in your IntelliJ tool ALT + F12
- Enter command
git ls-remotes --get-urlto see your current remotes - Enter command with modified username
git remotes set-url https://my_new_user@my.git.server/path/to/project.git
回答2:
i met this problem before, and solved it by steps:
- open terminal
- input git command that needs to communicate with git server, like
git pull origin <your branch> - input username and password ( because the stored password by idea can't be authorized, so the server will ask you to input username and password)
- done. (idea will update the password to the user)
来源:https://stackoverflow.com/questions/43543035/change-git-login-username-in-intellij-idea-rubymine-etc