Code.LocalGitCredentialsHelper.HelperError error 0 - selfhosted forgejo
Hello, I've been troubleshooting for the past couple days and failing. I keep getting the error in the title when attempting to push to my private instance of forgejo.
I'm able to clone a repo via link. I've tried my password credentials and personal tokens.
I am able to push to github. And I'm able to push using a different git app once it prompts to remove SSL.
I do have local network active. I've tried making fresh repos to test, I've tried a complete fresh install of the docker running the instance, I've tried deleting config files.
( EDIT: I am able to run lg2 push and then entering my username and token and successfully push from the terminal. But via the gui I cannot)
I'm not really sure what else to do and so am hoping someone can point me in the right direction to fix the issue.
I was able to successfully push to my repo at first when using the app - but I broke it somehow and no amount of troubleshooting seems to be able to fix it sadly :(
Hi. LocalGitCredentialsHelper.HelperError refers to UnsupportedRemoteURL. That means the git remote url is malformed. Please check the content of .git/config for any malformed urls. Alternatively, try re-cloning the repository and start fresh.
I'll take a closer look at the .git/config tomorrow. I did try clearing my local copy and then re-cloning then pushing and also tried pulling freshly made repos and pushing thinking there was an issue with the .git folder as a possibility but got the same error.
Could it being a LAN url as the domain cause an issue (like 192.1.1.1:1000) ? I host it internally unexposed to the outside internet.
Yep, that seems to be the reason. Swift's URL(init: String) couldn't seem to parse "192.1.1.1:1000". Could you share your .git/config for me to verify?
Adding a git:// prefix to the local ip address in .git/config should work
Hello, I attempted to make the update in my config file - but the error remains unfortunately. I also tried lg2 remote set-url but got an error in terminal when trying to set it to git://.
I also tried cloning again but altered the url to have git replace http, but this caused the cloning process to hang indefinitely.
Here is what my config file looks like before I swapped in git.
bare = false repositoryformatversion = 0 filemode = true precomposeunicode = true logallrefupdates = true [remote "origin"] url = http://192.168.1.1:1000/Username/reponame.git fetch = +refs/heads/:refs/remotes/origin/ [branch "main"] remote = origin merge = refs/heads/main
Since it's a local url issue, i will try assigning it an actual domain name later and can report back.
Just letting you know that after giving it a real domain it works fine. altering the config with my git://IP:Port didn't seem to work but I planned on setting up a domain eventually anyway.
Thanks for looking into this. I guess if someone did want to keep using their local ip, it will work with lg2 push and credentials just not from the GUI's push.
Thanks for letting me know. I will take a look again and fix the problem soon
np. Thanks for your work on this app - it's really allowed me to learn coding without being glued to my desk :)