Tag: gitlab

如何捆绑与电子git

首先,我知道这个问题: 如何将git与电子应用程序捆绑在一起 答案虽然没有帮助我。 我不想自动更新任何东西,我想通过我的电子应用程序克隆git回购。 有没有一个 可以克隆私人Gitlab存储库的Javascript唯一的解决scheme 将Windows / Linux / Mac git cli工具与我的应用程序捆绑在一起,让他们为我做克隆 任何帮助深表感谢!

npm在多域git存储库上安装失败

我们有一个新的项目,我们把它放在我们自己的Gitlab服务器上。 我从中克隆出来的 git@git.myacme.com:webapplication/app.git 成功。 假设我在gitlab中的用户名是scott@myacme.com。 我们在Github也有一个现有的项目,我使用的用户名是scott@yahoo.com 在新项目中,我们在package.json中有一个指向现有项目的入口。 记下https https://github.com/myacme/system-application.git 现在,当我执行npm install的时候,它试图在github.com上拉现有的项目时失败了。 这是说无效的用户名或密码….身份validation失败。 我认为它仍然使用scott@myacme.com而不是scott@yahoo.com 我不能更改package.json。 我正在考虑改为git链接,而不是https,但我会影响其他开发人员。 如果我这样做,我想它会使用我放在.ssh / config中的设置。 我添加了2个主机,我们的myacme.com和github.com 什么是这个解决方法? 我已经尝试使用我的雅虎电子邮件地址设置gitconfiguration全局user.name和user.email,但它仍然没有使用它。 我没有想法。 这是npm-debug.log文件中的确切错误 515 error git clone –template=/Users/scott/.npm/_git-remotes/_templates –mirror https://github.com/myacme/system-application.git /Users/scott/.npm/_git-remotes/https-github-com-myacme-system-application-git-0be15bdd: remote: Invalid username or password. 515 error git clone –template=/Users/scott/.npm/_git-remotes/_templates –mirror https://github.com/myacme/system-application.git /Users/scott/.npm/_git-remotes/https-github-com-myacme-system-application-git-0be15bdd: fatal: Authentication failed for 'https://github.com/myacme/system-application.git/'

使用GitLab API和Node.js下载GitLab存储库存档

我想从我的GitLab存储库下载(而不是克隆)档案,但是我得到这个错误 不正确的标题检查(Zlib._handle.onerror) 这是我的function: var fs = require('fs'); var url = require('url'); var https = require('https'); var path = require('path'); var targz = require('tar.gz'); function downloadFile(source, destination, name) { var options = { host: url.parse(source).host, port: 443, path: url.parse(source).pathname }; var file = fs.createWriteStream(destination + path.sep + name); https.get(options, function(res) { res.on('data', function(data) { file.write(data); }).on('end', […]

从Gitlab推到dokku

我想自动化我的NodeJS应用程序部署。 我正在使用Gitlab和dokku ,都在digitalOcean上。 如何做到这一点,每当我推gitlab,代码将自动推到dokku?

GitLab + GitLab CI +通过NPM从属SSH项目

目前我们使用GitLab来pipe理我们的回购和GitLab CI作为我们的CI。 我有一个项目,其中包括另一个GitLab项目作为依赖项(通过NPM)。 该项目是内部的,package.json中的URL以git+ssh://git@ ,这是我们在本地机器上使用的。 我们有SSH密钥设置。 但是,GitLab CI似乎无法使用相同的机制来安装这个依赖项目(通过npm install )。 我得到的错误是: npm install npm ERR! git clone git@my.domain.com:developers/my-repo.git Cloning into bare repository '/home/gitlab_ci_runner/.npm/_git-remotes/git-my-domain-com-developers-my-git-26043eba'… npm ERR! git clone git@my.domain.com:developers/my-repo.git npm ERR! git clone git@my.domain.com:developers/my-repo.git Host key verification failed. npm ERR! git clone git@my.domain.com:developers/my-repo.git fatal: The remote end hung up unexpectedly npm ERR! Error: Command failed: Host […]

如何使用gitlab跑步者在ec2上自动部署?

我想在gitlab上自动部署node.js项目。 目前我在.gitlab-ci.yml上使用下面的configuration deploy_to_dev_aws: only: – development script: – echo "$EC2_SSH_KEY" >> "key.pem" – chmod 600 key.pem – ssh -T -i key.pem -o StrictHostKeyChecking=no ubuntu@$EC2_HOST_IP <<EOF – cd ~/projects – rm myproject – git checkout git://myprojectpath – cd myproject – pm2 delete all – pm2 start app.js – logout – EOF stage: build 这是正确的方式,因为我login到ec2并执行所有操作? 还有什么其他方法可以做到这一点?

运行gitlab-ci.yml时,只有在合并请求发送给master时

我目前正在GitLab和Heroku中进行项目。 我想要做的是只要我要求我的function分支的合并请求(我们称之为crud-on-spaghetti ),我想自动运行在这个分支上的testing( npm test基本上,使用Mocha / Chai),以及成功之后,把这个crud-on-spaghetti和master合并,把它提交给origin/master (在GitLab上是远程的),然后在git push heroku master Heroku git push heroku master (基本上把他推到Heroku的主分店,应用程序被存储)。 我已经阅读了几篇关于GitLab CI的文章,我认为这更适合我(而不是Heroku CI,因为我没有DEV和PROD实例)。 所以,到现在为止,我手动做这个。 这是我的.gitlab-ci.yml文件( .gitlab-ci.yml没有被提交/推送): stages: – test – deploy test_for_illegal_bugs: stage: test script: – npm test deploy_to_dev: stage: deploy only: – origin master script: – git commit – git push origin master – git pull heroku […]

GitLab-CI和node.js – 如何启动本地服务器然后运行testing?

我已经设置了GitLab-CI,并正在编写我的.gitlab-ci.yml来运行我的testing。 我的应用程序是用node.js编写的,文件如下所示: before_script: – npm install – node server.js stages: – test job_name: stage: test script: – npm run test 我在启动服务器然后运行testing时遇到了麻烦,因为node server.js创build了一个永远不会存在的前台进程,除非您手动执行。 有没有办法启动服务器,然后继续,然后停止一旦testing完成? 或者我真的做错了,我的服务器应该开始在testing本身? 我所读的一切都只是说:“在另一个terminal上运行起始节点,然后在你的本地服务器上运行你的testing”,但是这在自动化的CI系统中显然没有意义。

CI使用Gitlab和Heroku

我正在使用react-starter-kit来开发我的web应用程序,并使用Gitlab作为我的远程git存储库。 我想configuration一个连续的部署,以便在每次向主服务器推送时,都会执行npm run deploy脚本。 从我的本地电脑执行npm run deploy构build节点应用程序并将其推送到远程的heroku git存储库。 它使用我的电脑本地凭据。 我已经configuration了gitlab runner(在.yml文件中)来执行相同的npm run deploy ,但是失败并显示Error: fatal: could not read Username for 'https://git.heroku.com': No such device or address 。 我需要find一种方法来validationgitlab亚军heroku。 我试图设置variablesHEROKU_API_KEY ,但它也没有工作。 我怎么能从我的gitlab亚军推到我的heroku git回购?

如何通过https使用私有GitLab存储库作为与私有令牌的npm依赖关系

我试图在我的节点js应用程序中使用私有GitLab回购作为npm依赖关系,使用私有令牌密钥,如下所示: "dependencies": { "my-module": "git+https://<privateToken>:x-oauth-basic@<myGitLabURL>/<MyUser>/my-module.git" } 当我运行npm install我得到有关git克隆fatal: unable to access <git repo path>错误fatal: unable to access <git repo path>与443连接被拒绝的答复。 我找不到很多关于如何通过https而不是通过ssh来完成的文档。 它似乎在GitHub上工作 有人在GitLab上使用Https有这方面的经验吗?