Using SSH keys
Ensure that you are running your local PowerShell as an administrator.
Enter the following command:
Set-Service ssh-agent -StartupType Automatic Start-Service ssh-agent Get-Service ssh-agent
Thanks for your feedback!
When you clone your project from a Git repository with SSH keys instead of a credential helper, you need to ensure that your local SSH agent is running.
If the SSH agent is running, you can add your local SSH keys to the agent using the ssh-add
command.
Check the following example:
ssh-add $HOME/.ssh/<your ssh key>
However, you may receive an error on Linux and Windows since the SSH agent is not running by default on these systems.
To resolve such issues, use the following steps:
Ensure that you are running your local PowerShell as an administrator.
Enter the following command:
Set-Service ssh-agent -StartupType Automatic
Start-Service ssh-agent
Get-Service ssh-agent
Start the SSH agent with the following command:
eval "$(ssh-agent -s)"
Add the following lines to ~/.bash_profile
or ~/.zprofile
if you prefer to use the Zsh
shell instead of bash
.
if [ -z "$SSH_AUTH_SOCK" ]; then
# Check for a currently running instance of the agent
RUNNING_AGENT="`ps -ax | grep 'ssh-agent -s' | grep -v grep | wc -l | tr -d '[:space:]'`"
if [ "$RUNNING_AGENT" = "0" ]; then
# Launch a new instance of the agent
ssh-agent -s > $HOME/.ssh/ssh-agent
fi
eval `cat $HOME/.ssh/ssh-agent` > /dev/null
ssh-add $HOME/.ssh/<your ssh key> 2> /dev/null
fi
On the last line of the suggested code, replace <your ssh key> with your specific ssh key. For example, ssh-add $HOME/.ssh/id_ed344 2> /dev/null
Thanks for your feedback!
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.