Comments
3 comments
-
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. -
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.
-
Hello Jon,
Thank you for the clues! Unfortunately, I got the same error message after the changes.
From CMD I can run e.g. git status (with the repo SSH URL) successfully and I do not need to enter my password. I started Flyway desktop from the same CMD and I got the same message if I clicked on the checkout button. (There are correct information on the uncommitted changes.)
Add comment
Please sign in to leave a comment.
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