imjp94 / gd-plug

Minimal plugin manager for Godot
MIT License
215 stars 15 forks source link

private repository support #23

Closed univeous closed 1 year ago

univeous commented 1 year ago

Even if I configured GitHub credentials, I cannot use this plugin to manage private repositories. logs:

cmdline_args: ["install", "debug"]
Plug start
Installation config loaded
Plug: { "name": "*****", "url": "https://git::@github.com/*****/*****.git", "plug_dir": "res://.plugged/*****", "include": [], "exclude": [], "branch": "", "tag": "", "commit": "", "dev": false, "on_updated": "", "install_root": "" }
Installing...
Request quit declined, threadpool is still running
Execute task <SceneTree#24830280835>.install_plugin()
Installing plugin *****...
Downloading ***** from https://git::@github.com/*****/*****.git...
Cloning from https://git::@github.com/*****/*****.git to C:/*****...
Execute "cd "C:/*****" && git clone --depth=1 --progress "https://git::@github.com/*****/*****.git" "C:/*****" 2> nul"
Execution ended(code:128): [""]
Failed to clone from https://git::@github.com/*****/*****.git
Failed to download *****
Failed to install plugin ***** with error code 128
Execution finished <SceneTree#24830280835>.install_plugin()
All thread finished

If I run git clone directly in cmd, there is no problem.

imjp94 commented 1 year ago

Confirmed, gd-plug can't install private repository

NathanLovato commented 1 year ago

Actually, it does support private repositories, but you need to use the full Git SSH path instead of nickname/repository. For example, for our repository godot-practice-framework, you'd have to use git@github.com:GDQuest/godot-practice-framework.git

This allows git to use your SSH keys to access the repository:

extends "res://addons/gd-plug/plug.gd"

func _plugging():
    plug("git@github.com:GDQuest/godot-practice-framework.git")

I'll PR a suggestion to the README

imjp94 commented 1 year ago

Wow, that's cool