(GitLab specifically! (No issues with GitHub))
I'm trying to create a script to pull a project from main GitLab branch without asking for password. A couple of remote computers have a kiosk-mode project. It's kind of boring to always connect manually to them - instead of having a cron-job to pull automagically.
I've setup to use SSH and created and added my SSH ed25519 key.
Added the proper url in ./.git/config like:
[remote "origin"]
url = git@gitlab.com:<ME>/<REPO>.git
where <ME> and <REPO> are my username and repository :)
Using git pull or fetch always asks for password. The same does not happens on my GitHub repos.
The only way I managed to make it work was using a Personal Access Token like:
[remote "origin"]
url = https://oauth2:<MY P. A. TOKEN>@gitlab.com/<ME>/<REPO>.git
But I don't like the token being in plaintext and having to do stuff out of the scope of SSH handshakes.
Is there something GitLab-specific I'm missing? Every help-page I was able to search just talks about setting the correct SSH URI (git@gitlab.com..... etc) which I already did. But every time I trigger a git pull it keeps asking for password.
Windows. Git Bash.
Appreciate any help, trick or insight.