I am using Gitea and currently trying to use the command line to checkout a single file using this
git archive --remote=git://gitea.server.com/project.git HEAD:path/to/directory filename | tar -x
from Retrieve a single file from a repository
But I am not able to include the credentials in order to work.
I have tried two combinations with my username and its generated access token
--remote=git://username:token@gitea.server.com/project.git
--remote=username:token@gitea.server.com/project.git
But it never works.
How can I include the user credentials in order to checkout a single file in one line?