ilyasemenov / gitlab-ci-git-push Goto Github PK
View Code? Open in Web Editor NEWGitlab CI runner image that pushes to a remote Git repo (Dokku, Heroku, Deis, etc.)
License: MIT License
Gitlab CI runner image that pushes to a remote Git repo (Dokku, Heroku, Deis, etc.)
License: MIT License
Show following error:
error: unable to push to unqualified destination: master
The destination refspec neither matches an existing ref on the remote nor
begins with refs/, and we are unable to guess a prefix based on the source ref.
error: failed to push some refs to '[email protected]:sota'
ERROR: Job failed: exit code 1
Hello!
Please is it possible (and how? i am able to send PR) to display output of the git-push command?
I would love to see Dokku's build in my Gitlab CI job log.
So far i have found this answer https://stackoverflow.com/a/2853811/6783051 using set -x
but it adds +
on each line which is imho ugly.
Hey, I'm not sure if I get it right. Does this package allow me to push to a regular private https://gitlab.com/username/repo
? 🙏
Gitlab.com doesn't like big repos. It will attempt a shallow clone by default in the worker.
You need to add these two lines in the **gitlab-ci**
file to make sure the entire repo is cloned. Dokku wants the full repo.
variables:
GIT_DEPTH: 10000
Git error you'll get otherwise sometimes: ! [remote rejected] 1234 -> master (shallow update not allowed)
https://docs.gitlab.com/ee/ci/large_repositories/#git-clean-flags
My SSH (and therefore my git server) runs on a nonstandard port, so it would be nice if I could specify the -p parameter (or other arguments to be passed to SSH) to connect.
При добавлении второго аргумента $branch пуш не происходит.
Ниже логи
$ git-push [email protected]:dev $CI_COMMIT_REF_NAME
# dokku.me:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
# dokku.me:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
# dokku.me:22 SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2
Warning: Permanently added the ECDSA host key for IP address 'XX.XX.XX.XXX' to the list of known hosts.
To dokku.me:dev
769ba3a..42eafbd HEAD -> develop
Job succeeded
Также я пробовал добавлять вместо $CI_COMMIT_REF_NAME конткретные ветки(develop, staging) - результат аналогичный.
I tried to set up the Gitlab CI as described but I'm getting this error:
Warning: Permanently added the RSA host key for IP address '140.82.114.3' to the list of known hosts. Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
This tells me everything is ok but the SSH keys.
One thing is ticking me is what is directed in this repos README (GitLab > Project > Settings > CI/CD > Secret Variables) and what is available at Gitlab right now is different. I'm suspicious that something has changed at Gitlab that broke this.
The Gitlab repo is https://gitlab.com/emreiyican/newsletter-server
The GitHub repo is https://github.com/emreiyican/newsletter_server
The .gitlab-ci.yml is below
`
image: ilyasemenov/gitlab-ci-git-push
variables:
GIT_DEPTH: 1000
stages:
before_script:
push to github:
stage: push
environment: production
script: git-push [email protected]:newsletter_server
`
I also tried without the 'before_script' part and got the same result.
I created the keys with ssh-keygen -f temp.key -q -N "" && cat temp.key && cat temp.key.pub
on my machine. Pasted both outputs to their respective places as printed.
At Gitlab, the SSH_PRIVATE_KEY
is configured as a Variable, with environment scope production
and protect variable selected.
To debug I added a line to echo the SSH_PRIVATE_KEY in the Gitlab CI file and saw that it was successfully printing the private key.
This container was working fine but I think the recent commit has broken things for me. The gitlab-ci.yml file reads
deploytostaging:
image: ilyasemenov/gitlab-ci-git-push
stage: deploy
script: git-push dokku@<my dokku server>:admin-staging
only:
- develop
but I get this error on build:
error: option `push-option' requires a value
usage: git push [<options>] [<repository> [<refspec>...]]
Do you have to use your image? Aka does it need a Docker runner to work or can you just use the script to get it to work?
Hi,
Do you mind adding a licence to your repo? I would suggest a MIT license
https://choosealicense.com/licenses/mit/
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.