简体   繁体   中英

Change GIT login/username in IntelliJ IDEA, WebStorm, RubyMine etc

Authentication login/username for my GIT account changed. How do I tell this to my IntelliJ product?

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-url to see your current remotes
  • Enter command with modified username git remotes set-url https://my_new_user@my.git.server/path/to/project.git

i met this problem before, and solved it by steps:

  1. open terminal
  2. input git command that needs to communicate with git server, like git pull origin <your branch>
  3. 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)
  4. done. (idea will update the password to the user)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM