Skip to content

git file:// won't accept valid file urls, wants extra slashes #1903

Closed

Description

@banshee

If you add this valid git url to paket.dependencies:

git file:///tmp/git/a/git/
Paket version 3.9.7.0
Paket failed with:
        Could not find hash for master in 'tmp/git/a/git'

git clone accepts it:

james@retina:/tmp/git$ git clone file:///tmp/git/a/git/ foo
Cloning into 'foo'...
remote: Counting objects: 3, done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (3/3), done.
Checking connectivity... done.
james@retina:/tmp/git$ 

paket.dependencies for some reason requires adding an extra / to the url:

git file:////tmp/git/a/git/

Activity

  1. forki commented on Sep 2, 2016

    @forki
    Member

    do you have a zip with a repro?

  2. added a commit that references this issue on Aug 28, 2026
    bf16ca9
  3. github-actions commented on Aug 28, 2026

    @github-actions
    Contributor

    🤖 This is an automated response from Repo Assist.

    I traced this to RemoteDownload.fs, which stripped (redacted) (all three slashes) from local git URLs before resolving the commit hash, turning an absolute path like /tmp/git/a/gitinto the relative pathtmp/git/a/git`. That's why an extra slash "fixed" it — one slash survived stripping by accident.

    I've opened a draft PR that strips only the (redacted) scheme, preserving the path's own leading slash so (redacted) resolves correctly without the extra-slash workaround: #4371 (will update once assigned a number).

    Generated by 🌈 Repo Assist, see workflow run. Learn more.
    Comment /repo-assist to run again

    Add this agentic workflow to your repo

    To install this agentic workflow, run

    gh aw add githubnext/agentics/workflows/repo-assist.md@ae8d551f07c7ed7619f8c58c7bb4c3ac89395d38
    
  4. banshee commented on Aug 28, 2026

    @banshee
    Author

    Wow - I filed this a decade ago and missed the followup question - sorry about that :-).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions