IntelliJ IDEA 14
remote repository
change credentials
authentication
version control

How to change Git remote credentials in IntelliJ IDEA 14

Codemia Knowledge Hub ·

To change the credentials IntelliJ IDEA 14 uses for a remote repository, clear the saved password under Appearance & Behavior > System Settings > Passwords, update the remote URL if it changed, or switch the remote to SSH authentication. You might need this after a password update, a new security policy or a move to a different account.

Before you start

  • IntelliJ IDEA 14 is installed.
  • You have the new remote repository credentials.
  • You are online, since some steps talk to the remote repository.

Steps to change the credentials

Step 1: open the project

Launch IntelliJ IDEA 14 and open the project linked to the remote repository whose credentials you need to update.

Step 2: open the version control settings

  1. Go to File > Settings (or IntelliJ IDEA > Preferences on macOS).
  2. Navigate to Version Control > Git.

Step 3: update the repository URL

If your credentials changed because of a new URL or SSH key, update the repository URL:

bash
# Example of changing the URL
git remote set-url origin <new-repository-URL>

Step 4: clear the saved credentials

  1. Go to File > Settings.
  2. Open Appearance & Behavior > System Settings > Passwords.
  3. You may see options such as In native Keychain or Do not save. Select Do not save temporarily to clear cached credentials.

Step 5: review the remotes

In the Git settings, click Manage Remotes to see the list of remotes. You can add, edit or remove entries there.

Switching to SSH authentication

SSH is often considered more secure than HTTP. To use it, set up your keys:

  1. Generate a new SSH key if needed:
bash
    ssh-keygen -t rsa -b 4096 -C "[email protected]"
  1. Add the key to your SSH agent:
bash
    eval "$(ssh-agent -s)"
    ssh-add ~/.ssh/id_rsa
  1. Add the public key to your account settings on the remote repository host.

Then, in IntelliJ IDEA, go to File > Settings > Version Control > Git and pick the SSH client (native or built-in) under SSH executable.

If the connection still fails

  • Check that the repository URL is correct and reachable.
  • Double-check your username and password.
  • If you use SSH, make sure the key is added to the SSH agent.
  • Look for error messages in IntelliJ IDEA's event log.
StepDescription
Access SettingsGo to File > Settings > Version Control
Change URLUse git remote set-url for URL modifications
Clear CredentialsAccess Passwords under System Settings
SSH SetupGenerate and add SSH key for secure access
TroubleshootingCheck validity of URL, credentials, and SSH keys

Course
Beginner
27 lessons
10 hours
System Design Fundamentals

Build a strong foundation in designing scalable, reliable distributed systems.

View the course
System Design practice on Codemia

Work through 120+ system design problems with detailed solutions, from rate limiters to multi-region storage.

Practice system design