Open Kaczuc opened 5 years ago
Well it seems like your url in the config is wrong so at least paste that part and change only reponame to testing.
If it is not public then you will need to add ssh keys
// Project configs
"repositories": [
{
"url": "https://gitlab.com/robertoo2940/test/tree/master",
"branch": "master",
"remote": "origin",
"path": "/home/TestBot",
"deploy": "echo deploying"
},
{
"url": "https://gitlab.com/robertoo2940/test",
"path": "/home/TestBot"
}
// ,{
// "url": "https://api.github.com/repos/olipo186/Git-Auto-Deploy",
// "deploy": "echo deploying after pull request",
// "filters": [
// {
// "type": "pull-request-filter",
// "action": "closed",
// "ref": "testing-branch"
// }
// ]
// }
]
}
None of the urls there are same from which you woud clone. One is link to file tree on master and other is missing .git
You will show me how it should look and conclude that this is how it should look https://gitlab.com/robertoo2940/test.git
That is what I see when I try to clone. I personally use ssh, so I dont know if https of private gitlab repo will even work as I assume it requires username and password to clone (but maybe it is public).
So a friend changed the settings of gitlab to public thanks to that you can clone when you set up colonizing after SSH?
Tell me if what I gave you is correct
That seems like correct url for https yes.
I don't understand the last question about ssh.
I mean, how to configure SSH
In rough: user that runs gitautodeploy generates ssh key and you copy public part of that key to deploy keys in gitlab and then enable that key in your repo and use ssh clone address instead of https.
I think readme in this repo has a bit more detailed description...
// Project configs "repositories": [ { "url": "https://gitlab.com/robertoo2940/test/tree/master", "branch": "master", "remote": "origin", "path": "/home/TestBot", "deploy": "echo deploying" }, { "url": "https://gitlab.com/robertoo2940/test", "path": "/home/TestBot" } // ,{ // "url": "https://api.github.com/repos/olipo186/Git-Auto-Deploy", // "deploy": "echo deploying after pull request", // "filters": [ // { // "type": "pull-request-filter", // "action": "closed", // "ref": "testing-branch" // } // ] // } ] }
I encounter the same problem, I read Git-Auto-Deploy source code and I realize that if we declare only url in repositories config, that is not enough. When gitautodeploy check, sometimes (i don't know reason) the actual request URL what it got is the last path of URL (with your example: 'https://gitlab.com/robertoo2940/test' then it get 'test' ), then I see we have another config is match-url, if this config is declared, the script will check it first, you only need declare config "match-url":"test" below url config, it will work. like this:
"repositories": [ { "url": "https://gitlab.com/robertoo2940/test", "match-url": "test", "branch": "master", "remote": "origin", "path": "/home/TestBot", "deploy": "echo deploying" } ]
I also have a question about adding my own weebhook to the site
I am aware that such a project does not exist is just an example of news because I do not want to show my main project