SmarGit unable to view a git repo mounted via sshfs

8 views
Skip to first unread message

Eric B

unread,
Feb 27, 2024, 3:09:15 AMFeb 27
to smar...@googlegroups.com
I have a bit of a tricky workflow.  Due to security constraints, I need to log into via SSH to a EC2 instance to checkout my git repo hosted on AWS CodeCommit (using the aws code-commit plugin/authentication scheme to git).

ie:  git clone codecommit::us-east-1://my-project-repo

Once my repo is cloned on my EC2 instance, I can then map my EC2 folder to a Windows box over ssh (using sshfs).  This works fine - I can view my entire repo on my Windows machine.


I was hoping at this point to be able to use SmartGit to peruse the repo and/or even be able to commit/etc to the local repo, even if it isn't configured to be able to push to CodeCommit from the Windows machine.  

But when I try to "Add" the repo to smartgit, it just fails with and error message:
Repository could not be opened.  Details: z:\dev\my-project-repo/.git/refs/heads

However, the heads file is present can be read/write by my Windows user.

Looking through the log file, I see the following:

3d 1h45m 0s746 (2024-02-26 15:30:15) [ThreadPool-2 (smartgit.bRh$$Lambda$400/0x0000000100465268)] INFO smartgit.repository.backgroundFetch - Running background poll: [Z:\dev\my-project-repo] 

3d 1h45m 0s777 (2024-02-26 15:30:15) [ThreadPool-3 (smartgit.axu$$Lambda$705/0x000000010050f240)] WARNING                 q.io - Failed to detect file stores 

java.nio.file.FileSystemException: Z:\dev\my-project-repo: The volume does not contain a recognized file system. 

Please make sure that all required file system drivers are loaded and that the volume is not corrupted 

at java.base/sun.nio.fs.WindowsException.translateToIOException(WindowsException.java:92) 

at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:103) 

at java.base/sun.nio.fs.WindowsException.rethrowAsIOException(WindowsException.java:108) 

at java.base/sun.nio.fs.WindowsLinkSupport.getFinalPath(WindowsLinkSupport.java:82) 

at java.base/sun.nio.fs.WindowsFileStore.create(WindowsFileStore.java:102) 

at java.base/sun.nio.fs.WindowsFileSystemProvider.getFileStore(WindowsFileSystemProvider.java:499) 

at java.base/java.nio.file.Files.getFileStore(Files.java:1498) 

at smartgit.Um.b(SourceFile:918) 

at smartgit.axu.a(SourceFile:177) 

at smartgit.bQM.a(SourceFile:46) 

at smartgit.bQX.a(SourceFile:39) 

at smartgit.axu.h(SourceFile:258) 

at smartgit.Zg.run(SourceFile:65) 




Is this a limitation with SmartGit that it is unable to read off a SSHFS mounted filesystem?   Is there some form of workaround that I can use otherwise?

Thank you,

Eric

syntevo Support

unread,
Feb 27, 2024, 4:23:16 AMFeb 27
to smar...@googlegroups.com
> Is this a limitation with SmartGit that it is unable to read off a SSHFS
> mounted filesystem?

It seems that the error message might originate even from a deeper level than the JVM:

https://github.com/winfsp/sshfs-win/issues/243
https://github.com/telepresenceio/telepresence/issues/2739

--
Best regards,
Marc Strapetz
syntevo GmbH
https://www.syntevo.com
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BT%2BPjFxkfvXxvUbjNesOK3MA1%3De2bi3U3_Z3aQiOycgh6R%2BNw%40mail.gmail.com.
>

Eric B

unread,
Feb 27, 2024, 1:05:09 PMFeb 27
to smar...@googlegroups.com
Thanks for the links.  I tried to follow the links and have it working in Python now, but SmartGit still throws errors, although the errors are different than before:

Ex (python):

from nt import _getfinalpathname 

_getfinalpathname('z:\\dev\\my-project-repo') 


m27s673 (2024-02-27 11:58:04) [main] INFO smartgit.repositoryTreeTable - open: [my-project-repo Z:\dev\my-project-repo]; already open: []
4m27s676 (2024-02-27 11:58:04) [main] INFO  smartgit.project.ui - Starting to scan Z:\dev\my-project-repo
4m27s830 (2024-02-27 11:58:04) [ThreadPool-1 (smartgit.axu$$Lambda$650/0x00000001004ffbc0)] INFO sc.file.monitor.worker.windows.main - Starting to watch Z:\
4m28s160 (2024-02-27 11:58:04) [ThreadPool-0 (Refresh-0)] INFO smartgit.index.cache - Reading index for Z:\dev\my-project-repo took 336ms
4m28s161 (2024-02-27 11:58:04) [ThreadPool-0 (Refresh-0)] INFO smartgit.index.cache - Caching state for Z:\dev\my-project-repo
4m28s227 (2024-02-27 11:58:04) [ThreadPool-0 (Refresh-0)] WARNING smartgit.refresh.thread - Z:\dev\my-project-repo\.git\refs\heads
smartgit.jv: Z:\dev\my-project-repo\.git\refs\heads
    at smartgit.bQV.a(SourceFile:154)
    at smartgit.bQU.run(SourceFile:100)
    at smartgit.Zg.run(SourceFile:65)
Caused by: smartgit.bGz: Z:\dev\my-project-repo\.git\refs\heads
    at smartgit.bQV.a(SourceFile:106)
    ... 2 more
Caused by: smartgit.kf: Z:\dev\my-project-repo\.git\refs\heads
    at smartgit.rX.a(SourceFile:119)
    at smartgit.hP.a(SourceFile:401)
    at smartgit.jJ.a(SourceFile:128)
    at smartgit.jJ.a(SourceFile:50)
    at smartgit.kH.a(SourceFile:49)
    at smartgit.bUj.a(SourceFile:311)
    at smartgit.bUj.a(SourceFile:104)
    at smartgit.bGJ.a(SourceFile:37)
    at smartgit.bGt.a(SourceFile:95)
    at smartgit.bQV.a(SourceFile:100)
    ... 2 more
Caused by: java.nio.file.FileSystemLoopException: Z:\dev\my-project-repo\.git\refs\heads
    at java.base/java.nio.file.FileTreeWalker.visit(FileTreeWalker.java:295)
    at java.base/java.nio.file.FileTreeWalker.next(FileTreeWalker.java:374)
    at java.base/java.nio.file.Files.walkFileTree(Files.java:2845)
    at smartgit.rX.a(SourceFile:74)
    ... 11 more 


I suspect that it may still relate to the same style-issue, however, this time it seems to be more JVM related.  

Any other thoughts that I can try?

Thanks,

Eric



syntevo Support

unread,
Feb 29, 2024, 4:16:15 AMFeb 29
to smar...@googlegroups.com
> I suspect that it may still relate to the same style-issue, however, this
> time it seems to be more JVM related.

Are you able to reproduce the original problem with a Java snippet using `Files.walkFileTree`? If so, can you get it working by changing the path-syntax?

--
Best regards,
Marc Strapetz
syntevo GmbH
https://www.syntevo.com


> > https://groups.google.com/d/msgid/smartgit/1709025746.643780.93525718%40syntevo.com
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BT%2BPjEj5tbk%3D6tMptPmdqDxe%3D2psa%2BVxq9tt%3DNTAg1oarM01w%40mail.gmail.com.
>

Eric B

unread,
Feb 29, 2024, 8:28:49 AMFeb 29
to smar...@googlegroups.com
I can try to what happens with jshell.  Which version of Java should I use?

What do you suggest as different path-syntax to try though?

Thanks

Eric

syntevo Support

unread,
Feb 29, 2024, 2:51:25 PMFeb 29
to smar...@googlegroups.com
> I can try to what happens with jshell. Which version of Java should I use?

That would be really helpful. Please try with Java 17.

> What do you suggest as different path-syntax to try though?

I didn't have anything specific in mind, but:

https://github.com/telepresenceio/telepresence/issues/2739#issuecomment-1220199824

mentions that something like "\\.\T:" might help.

--
Best regards,
Marc Strapetz
syntevo GmbH
https://www.syntevo.com



> > https://groups.google.com/d/msgid/smartgit/1709198151.691806.012270373%40syntevo.com
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BT%2BPjHfQm_%3Dv09tYMCp5XT2mP%3D4C1vVNX1f5%2B2v_6vxy-N7Gw%40mail.gmail.com.
>

Eric B

unread,
Mar 1, 2024, 10:45:32 AMMar 1
to smar...@googlegroups.com
Good / bad news.  File.walkFileTree() works and will print out all files in the path:

image.png

I also tried it against my actual git repo and checked against the .git subdirectory to be sure:
jshell> Files.walkFileTree(Paths.get("z:\\dev\\my-project\\.git"), new SimpleFileVisitor<Path>(){
...> public FileVisitResult visitFile(Path file, java.nio.file.attribute.BasicFileAttributes attrs) throws IOException{
...> System.out.println( file.toString() + " : " + Files.isReadable(file));
...> return FileVisitResult.CONTINUE;
...> }
...> });
z:\dev\my-project\.git\HEAD : true
z:\dev\my-project\.git\config : true
z:\dev\my-project\.git\description : true
z:\dev\my-project\.git\hooks\applypatch-msg.sample : true
z:\dev\my-project\.git\hooks\commit-msg.sample : true
z:\dev\my-project\.git\hooks\fsmonitor-watchman.sample : true
z:\dev\my-project\.git\hooks\post-update.sample : true
z:\dev\my-project\.git\hooks\pre-applypatch.sample : true
z:\dev\my-project\.git\hooks\pre-commit.sample : true
z:\dev\my-project\.git\hooks\pre-merge-commit.sample : true
z:\dev\my-project\.git\hooks\pre-push.sample : true
z:\dev\my-project\.git\hooks\pre-rebase.sample : true
z:\dev\my-project\.git\hooks\pre-receive.sample : true
z:\dev\my-project\.git\hooks\prepare-commit-msg.sample : true
z:\dev\my-project\.git\hooks\push-to-checkout.sample : true
z:\dev\my-project\.git\hooks\update.sample : true
z:\dev\my-project\.git\index : true
z:\dev\my-project\.git\info\exclude : true
z:\dev\my-project\.git\logs\HEAD : true
z:\dev\my-project\.git\logs\refs\heads\main : true
z:\dev\my-project\.git\logs\refs\remotes\origin\HEAD : true
z:\dev\my-project\.git\objects\pack\pack-205984ef79d1532a0b9d5c2ed58fc24e94010d4d.idx : true
z:\dev\my-project\.git\objects\pack\pack-205984ef79d1532a0b9d5c2ed58fc24e94010d4d.pack : true
z:\dev\my-project\.git\packed-refs : true
z:\dev\my-project\.git\refs\heads\main : true
z:\dev\my-project\.git\refs\remotes\origin\HEAD : true
z:\dev\my-project\.git\smartgit-trigger-1535821195573745655.tmp : true
z:\dev\my-project\.git\smartgit.config : true
$13 ==> z:\dev\my-project\.git




Any other ideas that I can/should try?  Just to be safe, I ran the same snipped in JShell in both an Admin and regular prompt.

C:\Program Files\OpenJDK\jdk-17\bin> .\jshell.exe 

  Welcome to JShell -- Version 17 

  For an introduction type: /help intro 




Thanks!

Eric

syntevo Support

unread,
Mar 4, 2024, 8:01:28 AMMar 4
to smar...@googlegroups.com
> Good / bad news. File.walkFileTree() works and will print out all files in
> the path:

Thanks. Now I'm wondering whether I might have identified the wrong code place in SmartGit. Please reproduce once again with clean logs and send the entire log file directly to smar...@syntevo.com:

<https://docs.syntevo.com/SmartGit/HowTos/Debugging.html>

--
Best regards,
Marc Strapetz
syntevo GmbH
https://www.syntevo.com



> > https://groups.google.com/d/msgid/smartgit/1709236259.970758.994755472%40syntevo.com
> > .
> >
>
> --
> You received this message because you are subscribed to the Google Groups
> "SmartGit" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
> smartgit+u...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/smartgit/CA%2BT%2BPjE0BsVMWsBRmctjkqL1X%3D8%3DCWwgniCx5Cwv%3DcCp5cpEdQ%40mail.gmail.com.
>

Eric B

unread,
Mar 8, 2024, 1:56:58 AMMar 8
to smar...@googlegroups.com
I have been away for the last few days.  I will try this again tomorrow and send you fresh logs.

Thank you,

Eric


Reply all
Reply to author
Forward
0 new messages