How can we help you today? How can we help you today?

Connecting to self-hosted GIT server

Hello, 

I use a self-hosted GIT server with ssh publickey.

I can do anything with git commands in cmd window (stared from Flyway Desktop Community).

However, from the desktop the Version contol / fetch updates gives error:

info   |[App] git response (code 1):

error  |[App] git-fetch error:
{"shortMessage":"Running git fetch failed","longMessage":"Could not read from remote repository.
Raw git output:
user@ip: Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.","type":"E_GIT_FAIL"} 
{"stack":"Error: {\"shortMessage\":\"Running git fetch failed\",\"longMessage\":\"Could not read from remote repository.
Raw git output:
user@ip: Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights\\nand the repository exists.\",\"type\":\"E_GIT_FAIL\"}
   at toErrorWithMessage (file:///C:/Users/user/Flyway/flyway-desktop/resources/app.asar/out/electron/index.js:1:31995)
   at IpcMainImpl.<anonymous> (file:///C:/Users/user/Flyway/flyway-desktop/resources/app.asar/out/electron/index.js:187:29465)
   at process.processTicksAndRejections (node:internal/process/task_queues:105:5)","message":"{\"shortMessage\":\"Running git fetch failed\",\"longMessage\":\"Could not read from remote repository.
Raw git output:
user@ip: Permission denied (publickey,password).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.\",\"type\":\"E_GIT_FAIL\"}"}

How can I set the .gitconfig settings (git parameters) for using the Desktop's builtin GIT commands? 

Thanks, Peter 

cserna.peter
0

Comments

2 comments

  • Jon Kirkwood
    Official comment

    Hi cserna.peter 

    Thank you for reaching out on the Redgate forum regarding your Flyway self-hosted GIT inquiry.

    You need to point Flyway Desktop’s built-in Git to your SSH key, as it doesn’t always use the same config as your terminal.

    A quick fix is to edit your global .gitconfig (e.g. C:\Users\<you>\.gitconfig) and add:

    [core]
        sshCommand = "ssh -i C:/Users/<You>/.ssh/id_rsa" 

    Then restart Flyway Desktop.

    Also make sure your key is loaded with:

    ssh-add ~/.ssh/id_rsa

    and that git remote -v shows an SSH URL (not HTTPS).

    This usually fixes the Permission denied (publickey) error for the embedded Git client.

    Jon Kirkwood
  • rickrode

    Connecting to a self-hosted Git server allows you to manage your code repositories with greater control, privacy, and customization compared to third-party services like GitHub or GitLab.

     

    rickrode
    0

Add comment

Please sign in to leave a comment.