godotengine / godot-git-plugin

Git implementation of the VCS interface in Godot
MIT License
656 stars 64 forks source link

(Need help) Can't login with remote login #242

Open Silenc3e3e opened 3 weeks ago

Silenc3e3e commented 3 weeks ago

Apologies if this isn't the right place to ask, but I've reached out on multiple other platforms/communities, and am not getting responses.

I'm trying to make the plugin work.

What I want (that I don't yet have):

I want the plugin to work as intended. And I want to better understand it. Note: I have used Git before. I would say I understand the basics, but there are some things I don't. I don't think I fully understand the references to "remote".

What happens:

When I click image to push, it comes up with the following error message. core/variant/variant_utility.cpp:1091 - GitPlugin: Could not connect to remote "origin". Are your credentials correct? Try using a PAT token (in case you are using Github) as your password. Error -1: too many redirects or authentication replays in godot-git-plugin\src\git_plugin.cpp:GitPlugin::_push#L533

What I don't understand:

Underneath the "VCS settings" I don't understand the "remote login" fields and what I should put in. I try putting in my git username and password, but that doesn't seem to fix it. If I put in my user name and a PAC key I generated, it works. But I don't want be generating a PAC key every 90 days, I'd rather just have my login information.

image (See image): I assume the left is for selecting a branch to pull from. The middle drop down to select a branch to push to(?). I don't understand the Fetch button (the circle with an arrow). I assume the down arrow will pull from the branch I have selected in the left drop down. And the up arrow pushes to the selected branch in the middle drop down.

I tried creating a "New Remote", but I honestly don't understand it. I'm guessing it is for connecting to a branch to be able to push to it? Cause it then appears in the second drop down. I named the remote "master" hoping it would connect to the master branch. And put in the url as I found in documentation

git@github.com:organization/repository.git

I replaced the organization with my username, and the repository with the name of the repository as found on github. As mentioned, this works when using a PAC token. While it works, I don't feel I understand what is going on.

Can you help with:

Understanding what is going on. I have read through documentation repeatedly. I have tried watching videos online to do with git. I think my lack of understanding lies around the plugin? If you think I don't understand certain concepts explained elsewhere, feel free to link me to videos/documentation.

Thank you in advance

Silenc3e3e commented 3 weeks ago

So I did some research into SSH, as I didn't fully understand it. I created SSH key(s) (the key, and the key.pub both appear). And made sure to add the pub key onto git hub itself. However, I am still getting errors when pushing. I've also now discovered the other thread pointing out the error many people get trying to use SSH keys. If I use the default "origin" remote I get error -1. If I use my own made remote, I get error -16. Is there something I might have missed that I should do? Do I need to set github up to receive my remote access? I also saw someone mention PEM SSH files. I don't know what that is, but is there a way for me to set that up?

ClassyChameleon commented 3 weeks ago

From https://github.com/godotengine/godot-git-plugin/wiki/Git-plugin-v3 There are known issues with SSH and it recommends using Personal Access Token in the meantime. It looks like you got that to work, so you can use it until a better solution comes along. That's what I'm doing at least.

As for documentations/tutorials, the link above is from the wiki of this repository and then there's the Godot vcs documentation: https://docs.godotengine.org/en/stable/tutorials/best_practices/version_control_systems.html Those are the official documentations but you should be able to find some step-by-step tutorials on youtube or through a search engine. Hope this helps, and good luck!