Fossil Forum

Can't push to chiselapp from WIndows 10 with fossil 2.9
Login

Can't push to chiselapp from WIndows 10 with fossil 2.9

Can't push to chiselapp from WIndows 10 with fossil 2.9

(1) By anonymous on 2019-08-10 20:41:37 [source]

I have put fossil 2.9 onto a machine with Windows 10. I've managed to clone and open my repo at https://chiselapp.com. However, having made some changes and committed them, I now can't push them back to chiselapp.

I've configured the local repo with

fossil remote-url https://<repo-user>:<password>@chiselapp.com/<chiselapp-user>/repository/<repo-name>

When I attempt to push, I get the error

missing or incorrect password for user "<repo-user>"

I have also put fossil 2.9 onto a machine with linux mint. After cloning and configuring, I can successfully push back to chiselapp.

I've compared the command-lines I used to do configure remote-url on the two systems and they are identical.

I notice that on Mint, after fossil remote-url, I am prompted

remember password (Y/n)?

but this prompt isn't issued on Windows 10.

Is it possible that on Windows, the password isn't saved?

(2) By Warren Young (wyoung) on 2019-08-10 22:44:15 in reply to 1 [link] [source]

Fossil doesn't store the password in the same place as remote-url, so it's not surprising that simply setting the remote URL doesn't always set the password as well.

Try giving the remote-url command without the :password bit and see if it prompts for a password in that case. If it does, then it'll update the password properly.

If the problem you're trying to solve is being able to switch the password via remote-url without answering a yes/no prompt, see the code for the new fossil clone --save-http-password feature. It should be simple to port that over to work with remote-url as well.

As for the discrepancy between Windows and non-Windows, yes, there are ifdef'd differences in those code paths, because Windows doesn't have a built-in getpass() function, so we have to do things differently on Windows. Doubtless the two ifdef cases aren't step-by-step identical. It's probably pretty simple to fix for someone with a Windows Fossil build environment set up.

(3) By ckennedy on 2019-08-10 22:51:45 in reply to 2 [link] [source]

Try giving the remote-url command without the :password bit and see if it prompts for a password in that case. If it does, then it'll update the password properly.

This is how I've always done it on Windows 10 with Fossil 2.9. I simply enter the password when prompted, enter 'y' to remember, and have had no issues. This is both with an initial clone, and after entering the fossil remote-url command.

I view it as bad practice to enter a password anyplace where it is visible in plain text, such as in the command history. So I never put it in unless prompted.

(4) By anonymous on 2019-08-11 18:33:31 in reply to 3 [link] [source]

Thanks for the two suggestions. Sadly they don't work.

    fossil remote-url https://username@chiselapp.com/etcetc

Immediately outputs the error

    missing or incorrect password for user "username"

    fossil remote-url https://uername:@chiselapp.com/etcetc

is accepted, but then issuing fossil commit (with autosync on) gives the same error.

I'd hope that the first form would prompt me for a password, while the second would explicitly specify a null password.

(5) By ckennedy on 2019-08-12 03:38:47 in reply to 4 [link] [source]

Are you running the build of Fossil 2.9 from the Fossil web site, or a custom build?

(7) By anonymous on 2019-08-12 11:31:58 in reply to 5 [link] [source]

From the website

(6) By Warren Young (wyoung) on 2019-08-12 04:43:51 in reply to 4 [link] [source]

Leave off the colon. You're telling Fossil that the password is empty by including it. You want Fossil to prompt you for it interactively instead.

(8) By anonymous on 2019-08-12 11:33:37 in reply to 6 [link] [source]

Yup. That's what I expected. If I leave off the colon then I get an error.

(9) By Richard Hipp (drh) on 2019-08-12 12:20:40 in reply to 8 [link] [source]

If you add the --httptrace option to the command, do you get one or more "http-request-" and "http-reply-" files left over in your local directory? Those file contain the raw HTTP request and reply, and might contain your unencrypted password or other sensitive information, so you probably should avoid posting them here. But you can look at them and see if the error is coming from the server, and if so, perhaps get a clue as to its cause.

FWIW, I am unable to reproduce your problem with generic cloud-based Fossil servers, though I haven't tried chiselapp specifically. Perhaps this has something to do with chiselapp - I don't know...

(10) By anonymous on 2019-08-12 12:39:24 in reply to 9 [link] [source]

Not certain which command you meant, so I tried fossil push --httptrace, fossil commit --httptrace and even, for good measure, fossil remote-url https://etc-etc-etc. There were no http-* files in the working directory.

(11.1) By nurdglaw on 2019-08-14 08:59:51 edited from 11.0 in reply to 10 [link] [source]

Deleted

(12) By nurdglaw on 2019-08-14 08:59:34 in reply to 9 [link] [source]

Here is a redacted log of my session, running in a cygwin session. I am running a version of fossil downloaded from the website.

My working directory is the root of my fossil checkout, and contains a directory called httpd. <repo-username> and <repo-password> are the username and password set in the repository on chiselapp, <ca-username> and <ca-repository> are my username and repository on chiselapp.

$ fossil version
This is fossil version 2.9 [0fd79a3e09] 2019-07-13 13:05:19 UTC

$ ls -d *http*
httpd

$ fossil remote-url https://<repo-username>@chiselapp.com/user/<ca-username>/repository/<ca-reponame> --httptrace
missing or incorrect password for user "<repo-username>"

$ ls -d *http*
httpd

$ fossil remote-url https://<repo-username>:<repo-password>@chiselapp.com/user/<ca-username>/repository/<ca-reponame> --httptrace
https://<repo-username>@chiselapp.com/user/<ca-username>/repository/<ca-reponame>

$ ls -d *http*
httpd

$ fossil push --httptrace
missing or incorrect password for user "<repo-username>"

$ ls -d *http*
httpd

I can see no logs. Have I specified the flag incorrectly, or issued commands other than expected?

I can work around the problem by running fossil sync, specifying the url (including username and password) but can't switch on autosync and do everything with fossil commit.

(13) By Martin Gagnon (mgagnon) on 2019-08-14 10:39:05 in reply to 12 [link] [source]

running in a cygwin session. I am running a version of fossil downloaded from the website.

Have you tried from a regular cmd window or from a powershell window?

I always had issue when using native windows fossil.exe under Cygwin or vice-versa.

If you want to use Cygwin, it’s better to use a Cygwin compiled fossil executable.

If msys is enough for you, the native windows executable will works just fine in a Msys shell.

(14) By Warren Young (wyoung) on 2019-08-14 16:05:42 in reply to 13 [link] [source]

+1: The Cygwin terminal I/O code is written with the assumption that it's working with programs using the I/O code in cygwin1.dll, and while it tries to work with native Windows executables directly making use of the Windows console APIs as well, it can fail to give expected output in that case.

Since fixing those problems with native executables would break Cygwin apps correctly using cygwin1.dll, requests for such fixes were always rejected during the years I participated on the Cygwin mailing lists. I assume that stance hasn't changed since I left.

Fossil is shipped in the Cygwin package repo, and as of this writing, they're shipping 2.9 as the latest version.

Not only will using the Cygwin build of Fossil solve your terminal output problems, it'll let you use POSIX paths, and it may have other ancillary benefits.

(15) By nurdglaw on 2019-08-15 07:29:31 in reply to 14 [link] [source]

Many, many thanks.

The problem was indeed my attempt to use the native windows image - downloaded from the website - rather than the image coming via cygwin.

I have updated my instalation and everything is now working as expected.

I have also asked about this on stackoverflow; after a decent pause for objections I will link this discussion to that question.

Thanks again.