-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Any plans for a Windows release? #2
Comments
Hello, thanks for your interest in the project! I don't believe there is anything in here that is specific to UNIX (and certainly nothing that wouldn't work in the Git shell for Windows), but I don't have any capacity to test it. If you'd like to give a try to compiling it for Windows and testing it out ( |
Thanks to you for sharing this project with the world. I have very basic skills for compiling and debugging compile issues but I will give it a try tomorrow for sure! The first obstacle I am finding is that I am using Restic for other backups and for that I use a version that is more recent than the recommended here ( I have 0.17.1 installed so that's what is added to PATH) and I prefer not to touch that setup now that I have it running. Would there be a way to use a different version for git-remote-restic? I see that there is a "restic" folder in the repo so is it maybe an alternative to drop there the restic executable that can be downloaded from https://github.com/restic/restic/releases/tag/v0.16.4 ? If i just run "make test" in a terminal I get the errors below but surely I have to first configure something related to restic on my end:
|
Yes, in fact, you don't need restic installed at all. The restic folder you see is a copy of the source code of the restic CLI program; it is embedded into the git-remote-restic program. So your system version of restic will not be used or considered when compiling.
You appear to not have go installed on your system. Since git-remote-restic is written in go, you will need to get go installed in order to compile. |
Alright I think I managed to compile it correctly! (with the help of Claude) The Makefile would apparently require quite a few changes to work with Windows. Claude tried to fix it but it still didn't work. So then Claude proposed to directly use "go install" and that worked. Steps I did: Install go for Windows. I already had git installed. Then from PowerShell: git clone https://github.com/CGamesPlay/git-remote-restic cd git-remote-restic git config --file=.gitmodules submodule.restic.url https://github.com/CGamesPlay/restic.git git submodule update --init --recursive go install -ldflags "-X main.Version=$(git rev-parse --short HEAD) -X main.ResticVersion=0.16.4" github.com/CGamesPlay/git-remote-restic/... After doing this a git-remote-restic.exe file is dropped here: Then I added git-remote-restic.exe to the PATH Since I don't want to use the Restic.exe that is in PATH (it is version 17.1) I just downloaded the restic_0.16.4_windows_amd64.exe from the Restic repo and I used that one to execute the init command. From my desktop computer I could do the initial restic repo creation and push a commit. This worked well and got this message on the terminal: I then tried to clone it from my laptop and I got this error: To be clear in the laptop I do not have Restic installed, but i do have git-remote-restic installed and added to the PATH. I believe that for just the cloning step that's all I need. AWS_ACCESS_KEY_ID if I export GIT_TRACE in PowerShell: Then I get a set of trace commands that shows that the last command executed (the one that fails) is: So it seems to be finding git-remote-restic.exe in the path and also cloning the right URL and since it is a s3 URL the SSH related error doesn't seem to match. Do you have any idea of what I might be doing wrong? |
So far, so good. This is what I would expect.
This seems to indicate that you are trying to clone from SSH, not from restic. Or from restic over SSH, possibly. Since you didn't show how you tried to clone that, I couldn't possibly know. Instead of jumping straight to using a real, remote restic repository, try using just a local one to verify that everything relating to git-remote-restic is working. Once that works you can upgrade to using a real S3-backed repository. Pushing to an empty local restic repo # From an existing git repository you want to test with
$ restic init -r local:../my-repo
enter password for new repository:
enter password again:
created restic repository f16e45b8af at local:my-repo
Please note that knowledge of your password is required to access
the repository. Losing your password means that your data is
irrecoverably lost.
$ git push restic::local:../my-repo main
Password for 'restic://none/../my-repo':
To restic::local:../my-repo
* [new branch] main -> main
# Confirm that there is a snapshot there
$ restic snapshots -r local:../my-repo
enter password for repository:
repository f16e45b8 opened (version 2, compression level auto)
created new cache in /.../restic
ID Time Host Tags Paths
---------------------------------------------------------------------------------------------------------------
0e888528 2024-12-24 09:11:44 macbook-pro.local /.../my-git-directory/.git
---------------------------------------------------------------------------------------------------------------
1 snapshots Cloning a new repository from a local restic repo # Creating a new clone, run this from the directory that has the my-repo directory in it
# We have to specify the branch we want to use here
$ git clone restic::local:./my-repo my-new-clone -b main
Cloning into 'my-new-clone'... If these commands work correctly, then you can try again using a remote repository (from the same computer to keep things simple), and once that's working, try cloning from your second computer. |
Well, everything up to the clone looks like it worked properly. I am not sure about the current error. It looks like it might be selecting the wrong protocol for the clone for some reason. I don't see anything about Pageant in the restic or git-remote-restic source code, but it does look like the error is coming from git-remote-restic. If you go back into the
If this works, then it's a useable workaround for the error you're seeing, and it helps narrow the problem down. |
Error likely comes from go-git/auth_method.go; I don't know why this method is being called since we aren't cloning from SSH. |
Great! Now we just need to figure out what is causing Glad you were able to get a workaround going! |
Hi,
I don't see any Windows builds on the Releases page, is there a way to run this with Restic for Windows? if not, do you plan to add Windows builds in the future?
Thank you in advance.
The text was updated successfully, but these errors were encountered: