Nicopag
Nicopag

Reputation: 61

Sublime text 2 - ssh public key - git push

Hi I am writing here asking for some help. This is driving me crazy. I have git bash working without problems. I can pull push commit etc Now, In sublime text 2 I can add, commit but not push or pull. How can I set in sublime text 2 which ssh public key to use? How can I configure the remote git in sublime? Thanks

Upvotes: 1

Views: 2048

Answers (1)

mesosteros
mesosteros

Reputation: 1519

Sublime Text uses whatever SSH key is defined for your system's Git installation as well as the settings (user, email).

So first of all, follow the instructions to generate an SSH key from GitHub (they can apply to other services, in my case it was GitLab).

When you have the SSH key defined for the System, you can follow the same process to add a Git Remote as you usually do (git remote add name url).

You might need to make a Git Pull from your remote repository before you can Push, though (and it seems it's the case from what I could gather from your comment). This was happening to me and then I read that at the Sublime Git documentation. After I tried it, Push began working.

I was using SideBarGit instead of Sublime Git so this was a common problem of Sublime Text itself rather than the plugin itself. But either way you should be using one of those packages instead of the default Git package in Sublime (it is rather tacky and too disperse to use). SideBarGit is free of charge, Sublime Git has a purchasable license.

Upvotes: 1

Related Questions