- Edited
I'm trying to use The Godot Git plugin v3 with a Godot 4.0.4 project. (I'd prefer to use Godot 4.2, but the plugin is only compatible with 4.0.)
References for this plugin:
https://github.com/godotengine/godot-git-plugin/wiki/Git-plugin-v3
https://godotengine.org/asset-library/asset/1581
(v3 of the plugin is for Godot 4, v2 of the plugin is for Godot 3)
It works correctly with the local git repository, but fails to push commits to the remote github repository.
GitPlugin: Performing push to origin
core/variant/variant_utility.cpp:903 - 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:_push#L532
This is apparently a known issue:
https://github.com/godotengine/godot-git-plugin/issues/192
So I'm trying the workaround of using a shell command (outside of Godot) to push the local repository to the remote github repository. But I can't figure out how to do that.
I created an SSH key pair, and verified that the key works with github by using this shell command:
ssh -T git@github.com
If I try this shell command to do the push:
git push origin master git@github.com:USER_NAME/REPO_NAME.git
I get this error:
error: failed to push some refs to 'https://github.com/USER_NAME/REPO_NAME'
USER_NAME is replaced by my github username, and REPO_NAME is replaced by the github repository name. I previously created the repository on the github.com web site.
Why is the git push
shell command not working?
My goal is to make the remote repository the same as the local repository.