simple-git not working when generating electron build for MAC OSX

124 Views Asked by At

I'm trying to do a git clone with SSH, using simple-git in an electron app.

If I run in dev mode, everything goes well, and I can clone the repo, but when I build the application to a native mac osx app (*.app), I'm always getting an error saying:

GitError: fatal: not a git repository (or any of the parent directories): .git

But this message has no sense since I'm doing a git clone

The code that I'm executing is something like this (it works if I run dev):

simpleGit()
.env('GIT_SSH_COMMAND',ssh -o UserKnownHostsFile=miHostFile -o StrictHostKeyChecking=no -i my_secret_key`)
.clean(CleanOptions.FORCE)
.clone(
   `[email protected]:remote-repo.git`, 
   '.Users/user_name',
   ['-b', master,'--single-branch']
)

I'm wondering if this could be for a COORS problem or any other thing that I'm not allowed to do from an app

0

There are 0 best solutions below