How to set git credentials for KiCad

I am using git versioning for KiCad files for a while. In KiCad 9 git version control shows up, so I decide to give it a try. It seems to be working locally, however it does not work, with remote server. I have my git credentials configured for git globally (username, access token instead of password) - it works from windows command line and also from git command prompt. The remote server is gitlab and I am using http access. Screenshots follows:



If I try to clone project from our gitlab server, connection test is passed successfully, project is cloned, however if I try to pull changes, it again report the same error (failed to set the credentials). Screenshots follows:

Screenshot 2025-02-21 075842


Screenshot 2025-02-21 080804

Any ideas, how to fix it?

1 Like

I’m testing it too.
For github, you need to create a public ssh key and put it in your profile (your profile->settings->ssh and gpg keys->add key.

Then when you clone repository from git, select ssh as connection type (you have https selected as your screenshot shows), then KiCad asks for the location of the private key you want to use. Select it, and then it works.

What I yet not have found is where KiCad (or git?) stores that information. I’d like to change existing repositories (that where cloned with github desktop using oauth) to work with the git integration, without the need to re-clone them.

Since I have troubles with that feature too: you mean with github, you HAVE to use ssh instead of https? I prefer https because I don´t have to organise/manage the ssh keys across different machines

To my knowledge https only works using https access tokens:

https://www.howtogeek.com/devops/how-to-set-up-https-personal-access-tokens-for-github-authentication/

Never tried that to be fair

1 Like

On your systems credential manager for https. Windows → Credential Manager

SSH keys are based on automatic trial of keys in your /User/.ssh/ folder.

The choice of https or ssh is based on the “remote” configuration on the cloned repo and it’s entirely based on whether the remote starts with https or not.
You can use git remote in cli to see the options to view your remote and change it.

1 Like

I get “authentication required but no callback set” when I press the “Test” button in the KiCAD “Set default remote” dialog to set up version control.

I have added the ssh key of my github account to my .ssh folder. From command line I can successfully git clone and push the repository. Any idea?

Thanks

it only supports ssh,https and local :frowning:
I kept my home gitea server as http for convenience so I guess I need to start getting a self-cert