bitbucket

Git Subtree only one file or directory

跟風遠走 提交于 2020-01-10 07:19:00
问题 I use Git Subtree like below: git subtree add --prefix=directory_destination_path --squash git@bitbucket.org:kicaj/projectname.git master But in path: directory_destination_path copy all repo from projectname.git How to copy to directory_destination_path only subdirectory or only some file from projectname.git ? EDIT: One more question: How to update (automatic) files changes in both repositories were still the same? It is possible? 回答1: If I understand, you seem to want to only merge in a

Git Subtree only one file or directory

橙三吉。 提交于 2020-01-10 07:17:08
问题 I use Git Subtree like below: git subtree add --prefix=directory_destination_path --squash git@bitbucket.org:kicaj/projectname.git master But in path: directory_destination_path copy all repo from projectname.git How to copy to directory_destination_path only subdirectory or only some file from projectname.git ? EDIT: One more question: How to update (automatic) files changes in both repositories were still the same? It is possible? 回答1: If I understand, you seem to want to only merge in a

Webhook 通用触发插件

半世苍凉 提交于 2020-01-09 18:56:07
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 本文首发于: Jenkins 中文社区 原文链接 作者:Tomas Bjerre 译者:wenjunzhangp Webhook 通用触发插件 介绍通用 Webhook 触发插件,使用 Webhook 插件构建 Jenkins 自动化服务 这篇文章将介绍我在 Jenkins 上遇到的一些常见问题,以及如何通过开发 通用 Webhook 触发插件 来解决这些问题。 问题 在使用 Jenkins 工作时,我经常遇到同样的问题: 代码重复和安全性 -每个仓库中的 Jenkinsfiles 。 分支不是功能 - master 上的参数化任务通常会混合与不同功能相关的参数。 记录不良的触发器插件 -记录正常服务但记录不佳的使用插件 代码重复和安全性 每个 Git 仓库中都有 Jenkinsfiles,使开发人员可以使这些文件分开。开发人员 push 他们的项目,并且很难维护共享代码的模式。 我几乎用共享库解决了代码重复问题,但是它不允许我设置必须遵循的严格模式。任何开发人员仍然可以决定不调用 共享库 提供的功能。 还允许开发人员运行 Jenkinsfiles 中的任何代码的安全性方面。例如,开发人员可能会打印从凭据收集的密码。让开发人员在 Jenkins 节点上执行任何代码对我来说似乎不合适。 分支不是功能 在

使用 Jenkins 实现 CI/CD 多分支流水线

核能气质少年 提交于 2020-01-09 18:31:49
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 本文首发于: Jenkins 中文社区 原文链接 作者:Krishna Prasad Kalakodimi 译者:anxk 使用 Jenkins 实现 CI/CD 多分支流水线 基于 Jenkins 多分支流水线任务类型创建 CI/CD 多分支流水线 简介 Jenkins 是一个持续集成服务器,用于从版本控制系统(VCS)中获取最新代码,然后对其进行构建、测试并将结果通知给开发人员。除了作为一个持续集成(CI)服务器之外,Jenkins 还可以做很多其它的事情。最初它被称为 Hudson,是川口耕介(Kohsuke Kawaguchi)基于 Java 编写的一个开源项目,因此,在安装和运行 Jenkins 之前,首先需要安装 Java 8 。 多分支流水线 是 Jenkins 中的一种流水线类型,它允许您在 Jenkinsfile 的帮助下为源码管理(SCM)库中的每个分支自动地创建一支流水线。 什么是 Jenkinsfile Jenkinsfile 是一个文本文件,被用来定义一个 Jenkins 流水线。在 Jenkinsfile 中可以使用 领域特定语言(DSL) 编写运行 Jenkins 流水线所需要的步骤,从而将流水线实现为代码。 来自 Jenkins 的定义 使用多分支流水线

Deleting remote master branch, refused due to being current branch

别来无恙 提交于 2020-01-09 04:14:09
问题 How do I delete a remote master branch from GitHub/Bitbucket? I'm trying: # git push bb --delete master remote: bb/acl: user is allowed. accepted payload.[K remote: error: refusing to delete the current branch: refs/heads/master[K To ssh://git@bitbucket.org/user/reponame.git ! [remote rejected] master (deletion of the current branch prohibited) error: failed to push some refs to 'ssh://git@bitbucket.org/user/reponame.git' Also I tried git push bb :master But all this is not work. 回答1: Note:

'cannot open git-upload-pack' error in Eclipse when cloning or pushing git repository

可紊 提交于 2020-01-09 04:13:40
问题 I am not able to clone or push to a git repository at Bitbucket in Eclipse: It's weird, because a day before I didn't have any problem. I have downloaded the sts 3 times with no luck. This error keeps showing. Also I have installed SourceTree and it says 'This is not a valid source path / URL': If I use git commands to import the project, it works, but I wan't to use EGit for this task, since I am a newbie with git. I don't know if this has to do with it, but in the same directory I have the

Git - Clone Repositories in Bulk

拈花ヽ惹草 提交于 2020-01-07 03:54:26
问题 I just joined a company that has a git server (hosted through bitbucket), which has about 80 projects which have multiple repositories under each project (lets say 5 for easy math). Is there an easy way to recursively clone all 400 of these repositories? 回答1: You will have to script hat yourself. You can get a list of the repositories from the BitBucket API. Then just loop through them an clone each one. 来源: https://stackoverflow.com/questions/34183580/git-clone-repositories-in-bulk

Clear Git repository

一笑奈何 提交于 2020-01-07 02:37:10
问题 I've to transfert a TFS server to a GIT(Bitbucket) server. We are currently using git-tfs to do it, but we are doing some tests before migrating(like configuring jenkins, checkin that everything is correctly transfered). The issue is that now it seems I cannot run the git push command because I've the repository that is already filled with a lot of stuff from the previous run. Is there a way to "reset" the repository(like if I've never done any commit) ? Without deleting it? I've found this:

Clear Git repository

落爺英雄遲暮 提交于 2020-01-07 02:37:05
问题 I've to transfert a TFS server to a GIT(Bitbucket) server. We are currently using git-tfs to do it, but we are doing some tests before migrating(like configuring jenkins, checkin that everything is correctly transfered). The issue is that now it seems I cannot run the git push command because I've the repository that is already filled with a lot of stuff from the previous run. Is there a way to "reset" the repository(like if I've never done any commit) ? Without deleting it? I've found this:

Jenkins - Get code from BitBucket with SSH

夙愿已清 提交于 2020-01-06 20:01:42
问题 I Created a private key and added the public key to my keys on bitbucket just like explained in this tutorial I'm trying to add the private key to Jenkins under Credentials menu but it just keep saying: Failed to connect to repository : Command "C:\Program Files\Git\cmd\git.exe -c core.askpass=true ls-remote -h git@bitbucket.org:bla/blabla.git HEAD" returned status code 128: stdout: stderr: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have