Hi everyone, happy gitea user here
I want to push a repo from my gitea server to a diffrent remote git server (gitlab).
So i created a post-recieve hook for the repository under repository -> settings -> git hooks -> post-recieve
#!/bin/bash while read oldrev newrev ref do if [[ $ref =~ .*/master$ ]]; then echo "master ref. push blog to gitlab.. " git push gitlab master else echo "not on master branch.. " fi done
Everytime i push code to my gitea server now, i get the following response:
remote: master ref. push blog to gitlab.. remote: fatal: 'gitlab' does not appear to be a git repository remote: fatal: Could not read from remote repository. remote: remote: Please make sure you have the correct access rights remote: and the repository exists.
I have created a ssh-keypair for the git user (the user running gitea) and placed it in ~/.ssh
Also i’ve pasted the public key of the git user into my gitlab account under settings -> SSH Keys.
Using gitea version 0549762 with docker.
Is there something iam missing? Is my post-recieve hook wrong?
Any help appreciated!
Thanks in advance and have a nice day.