Change GIT login/username in IntelliJ IDEA, RubyMine etc

谁说胖子不能爱 提交于 2019-12-22 08:45:22

问题


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-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



回答2:


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)


来源:https://stackoverflow.com/questions/43543035/change-git-login-username-in-intellij-idea-rubymine-etc

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!