Trouble with jarsigner in Cygwin

I get this error when trying to sign apk in repo in local f-droid server:

$ fdroid update -v
DEBUG: Reading config.py
DEBUG: Processing testibildi1.apk
DEBUG: > C:/Users/******/AppData/Local/Android/sdk/build-tools/25.0.1/aapt dump badging repo/testibildi1.apk
DEBUG: > C:/Users/******/AppData/Local/Android/sdk/build-tools/25.0.1/aapt dump xmltree repo/testibildi1.apk AndroidManifest.xml
DEBUG: Getting signature of repo/testibildi1.apk
DEBUG: > C:\Program Files/Java/jdk1.8.0_121/bin/jarsigner -verify /cygdrive/c/inetpub/wwwroot/fdroid/repo/testibildi1.apk
jarsigner: java.io.FileNotFoundException: \cygdrive\c\inetpub\wwwroot\fdroid\repo\testibildi1.apk (The system cannot find the path specified)
CRITICAL: /cygdrive/c/inetpub/wwwroot/fdroid/repo/testibildi1.apk has a bad signature!
CRITICAL: Failed to get apk signature

i think it’s the same situation here: https://f-droid.org/forums/topic/fdroid-update-failing-on-windows/
But it wasn’t answered there.

Anyone know solution to this?
I have to use Cygwin because of win server 2012

This is due to jarsigner not handling the Cygwin paths well. fdroidserver needs to be ported to handle Cygwin well. We have preliminary androguard support almost done: https://gitlab.com/fdroid/fdroidserver/merge_requests/234 so that moves things close to pure Python, which will handle Windows much better.

I think the best approach for better supporting jarsigner is to use a Python library to verify the APK signatures and generate the JAR signatures on the index files.

Otherwise for Windows, your best bet is to use Windows 10’s new Ubuntu environment. Or if you just want a hack to get it working, you can remove the jarsigner -verify calls from the Python code, they are mostly a failsafe check. They do improve the security of things though, so keep that in mind.

Here’s where we are tracking using Python to replace jarsigner: https://gitlab.com/fdroid/fdroidserver/issues/94