signing failed

Hello, I have used Syncthing for Windows for a long time,Now,I want to modify the picture in the software(png/svg).But the cmd waring codesign: signing failed,like this: go run build.go zip Codesign: signing failed: syncthing-windows-386-v1.11.1.zip

Does anyone happen to know how to solve this problem?

This is expected unless you’ve done the full setup for code signing, which is not necessary unless you need to distribute signed binaries.

thanks for your answer.but how to done the full setup for code signing? I just want using this for myself.

You need signtool.exe from Visual Studio, a code signing certificate in a format understood by signtool, and setting the environment variables mentioned here:

You can see the signtool documentation for details on the options.

Thank you for your answer, let me try

Just for the record, there is no need to sign if you want to just compile and use a binary on your own.

Singing is needed for automatic updates though, at least as far as I understand. I have actually been thinking of singing my own binaries, mainly because I would like to be able to auto-update the binary on my Android devices.

I have this forum thread saved: https://forum.syncthing.net/t/windows-binary-signing/7720. It seems to be the only source talking about creating singed binaries under Windows. I myself have only gone so far as creating the certificate though.

Yes,I just want compile and use a binary on myself. but the warning I dont know how to solve.

**go run build.go zip **
**Codesign: signing failed:**
**syncthing-windows-386-v1.11.1.zip**

It’s just a warning, you can ignore it.

If you run without the zip command, you will have the compiled binaries in the bin directory.

when I run go run build.go zip,do not create bin directory.

I read signtool documentation,But how can I use signtool in cmd and run go run build.go zip?

When you run build.go zip you get a zip file, like you asked for. You can ignore the warning about code signing. I’m not going to guide you through signtool.

Yes,when I run build.go zip ,I can get one syncthing.exe and one syncthing-windows-386-v1.11.1.zip. I changed this folder img on source code(syncthing\gui\default\assets\img),But when I run the syncthing.exe ,this images displayed on the browser have not changed。

Thanks for all the suggestions, I have solved this problem. Maybe my environment variable is abnormal. I used another computer, and now after running the program, the picture displayed on the browser is my modified one.