-
I have my linux environment set up with an SSH agent and a private key, the corresponding public key of which is added to my github. I have a plugin I created for my colorscheme as well as my neovim configuration on my github as private project and I would like to be able to just git clone and run neovim and have lazy pull everything in automatically when I set up a new system. Unfortunately lazy doesn't seem to want to use the system ssh keys or prompt me for the password etc so I can't get it to pull down my colorscheme plugin. Is there a way I can get lazy to use my ssh key and prompt me for the password if needed? Or do I need to set up something to get it to remember my password so lazy can just pick up and use the key? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
For anyone looking for how to get this working, I ended up creating an access token for lazy and adding it to my git account with readonly permissions. Then in my plugins.lua (Where I set up lazy and load all my plugins) I do the following: local token = "<token copied from github>"
local git_url = "https://N19htfox:" .. token .. "@github.com/"
require( 'lazy' ).setup(
{
-- other plugins...
{ git_url .. "N19htfox/MyPrivatePlugin.git" },
},
{
-- other lazy settings
},
) I have my .config/nvim directory in another private github repository and the token itself has very limited access (just enough for lazy to pull down the repos I need). If you want to make your config public you can put the token in a separate file and have the token string read from that file (adding it to the gitignore so it doesn't get uploaded) but I can't imagine why you would want to have a public neovim config reference a private repo that you don't give people access to. |
Beta Was this translation helpful? Give feedback.
For anyone looking for how to get this working, I ended up creating an access token for lazy and adding it to my git account with readonly permissions.
Then in my plugins.lua (Where I set up lazy and load all my plugins) I do the following:
I have my .config/nvim directory in another private github repository and the token itself has very limited access (just enough for lazy to pull down the repos I need). If you want…