Skip to content

Get lazy to use my github login / sshkey #1912

Answered by N19htfox
N19htfox asked this question in Q&A
Discussion options

You must be logged in to vote

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…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by N19htfox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant