Trying to use SSH to clone private Gitea repositories

Little Cat's Avatar

Little Cat

09 Mar, 2020 07:00 AM

Hello, we have just set up our self-hosted AppVeyor to implement automatic builds into our Gitea repositories, but hours later, we have no luck trying to get it to clone repos with SSH instead of HTTPS.

For security shakes, we have set up our Gitea instance to only allow SSH remotes instead of both HTTPS and SSH, and according to the AppVeyor docs, it states that it should clone private repositories through SSH,. It works perfectly fine for private GitHub repos perfectly but for some reason, it isn't doing that on our end, it doesn't seem to be generating SSH keys and adding the keys into the repo and in turn, trying to use HTTPS to clone while it's completely off on their end. Adding the repo in manually as a "generic" git repo works without a problem though, but we highly prefer adding it in the way it was intended.

Any ideas of what we should do?

  1. Support Staff 1 Posted by Feodor Fitsner on 09 Mar, 2020 10:13 PM

    Feodor Fitsner's Avatar

    Gitea provider uses Gitea access token to clone a private repository, so you have to provide your own SSH key during the build and put a custom clone script.

  2. 2 Posted by Little Cat on 09 Mar, 2020 10:43 PM

    Little Cat's Avatar

    Truth be told, I didn't even realize that setting up custom clone scripts are even a thing. I was heavily referencing the appveyor.yml reference and yet it makes no reference to clone_script. I changed the file to use the said setting to clone using SSH, and it works perfectly.

    Thank you so much for pointing us in the right direction. Feel free to close this discussion.

  3. Support Staff 3 Posted by Feodor Fitsner on 09 Mar, 2020 10:45 PM

    Feodor Fitsner's Avatar

    Cool, thanks for the update!

  4. Feodor Fitsner closed this discussion on 09 Mar, 2020 10:45 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts


? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac