小编ANI*_*NIL的帖子

如何从GIt中删除特定的提交?

我想从我的远程存储库中删除一些提交.在我的回购中我几乎没有这样的提交:

commits    messages

abcd123    some message
xyze456    another commit message
98y65r4    this commit is not required
987xcrt    this commit is not required
bl8976t    initial commit
Run Code Online (Sandbox Code Playgroud)

我想删除提交 98y65r4987xcrt我的回购.怎么实现呢?

git

10
推荐指数
1
解决办法
2万
查看次数

为什么Jenkins中的GIT插件无法连接到GIT存储库?

我试图使用GIT插件Jenkins从GIT中获取代码,并且该作业正在从属机器上运行.

MASTER 系统有 http_proxy=mycom.domain.com:80

SLAVE系统中没有http_proxy定义.

每当我在SLAVE机器中进行本地git clone时它都能很好地工作,但是从Jenkins我没有成功.

它抛出以下错误:

Building remotely on SLAVE in workspace /data/test
 > /usr/bin/git rev-parse --is-inside-work-tree # timeout=10
Fetching changes from the remote Git repository
 > /usr/bin/git config remote.origin.url https://github.domain.com/Project-Digital/Project-eCommerce.git # timeout=10
Fetching upstream changes from https://github.domain.com/Project-Digital/Project-eCommerce.git
 > /usr/bin/git --version # timeout=10
using GIT_ASKPASS to set credentials 
Setting http proxy: mycom.domain.com:80
 > /usr/bin/git fetch --tags --progress https://github.domain.com/Project-Digital/Project-eCommerce.git +refs/heads/*:refs/remotes/origin/*
ERROR: Error fetching remote repo 'origin'
hudson.plugins.git.GitException: Failed to fetch from https://github.domain.com/Project-Digital/Project-eCommerce.git
    at …
Run Code Online (Sandbox Code Playgroud)

git github jenkins devops

6
推荐指数
1
解决办法
2万
查看次数

詹金斯为什么说"服务器在启动代理时拒绝了1个私钥"?

我成功地能够使用SSH连接到远程计算机,但是当我从Jenkins启动代理时,它会抛出以下错误:

ERROR: Server rejected the 1 private key(s) for user1 (credentialId:xxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/method:publickey)
[01/19/17 05:35:15] [SSH] Authentication failed.
hudson.AbortException: Authentication failed.
    at hudson.plugins.sshslaves.SSHLauncher.openConnection(SSHLauncher.java:1219)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:714)
    at hudson.plugins.sshslaves.SSHLauncher$2.call(SSHLauncher.java:709)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
    at java.lang.Thread.run(Thread.java:745)
[01/19/17 05:35:15] Launch failed - cleaning up connection
[01/19/17 05:35:15] [SSH] Connection closed.
Run Code Online (Sandbox Code Playgroud)

我可以使用建立从主机到节点机器的SSH连接user1,但是当我尝试使用user1jenkins 启动代理时,它拒绝私钥.有没有解决方案可以解决这个问题?

ssh master-slave jenkins devops jenkins-slave

5
推荐指数
2
解决办法
2万
查看次数

Dockerfile - 在构建时隐藏 --build-args

我有以下 Dockerfile:

FROM ubuntu:16.04

RUN apt-get update \
    && apt-get upgrade -y \
    && apt-get install -y \
    git \
    make \
    python-pip \
    python2.7 \
    python2.7-dev \
    ssh \
    && apt-get autoremove \
    && apt-get clean

ARG password
ARG username
ENV password $password
ENV username $username

RUN pip install git+http://$username:$password@org.bitbucket.com/scm/do/repo.git
Run Code Online (Sandbox Code Playgroud)

我使用以下命令从这个 Dockerfile 构建镜像:

docker build -t myimage:v1 --build-arg password="somepassoword" --build-arg username="someuser" .
Run Code Online (Sandbox Code Playgroud)

但是,在构建日志中,我传递的用户名和密码--build-arg是可见的。

Step 8/8 : RUN pip install git+http://$username:$password@org.bitbucket.com/scm/do/repo.git
 ---> Running in 650d9423b549
Collecting git+http://someuser:somepassword@org.bitbucket.com/scm/do/repo.git
Run Code Online (Sandbox Code Playgroud)

如何隐藏它们?或者是否有不同的方式在 …

docker dockerfile docker-build

5
推荐指数
2
解决办法
1850
查看次数

如何使用单个作业配置在多个从站上运行 Jenkins 作业?

我有三个不同的环境,每个环境都包含一个 Jenkins Slave,

STAGE1 - slave1
STAGE2 - slave2
STAGE3 -slave3

我不想为他们创建三个不同的构建作业。

我想将奴隶 ( slave1,slave2slave3) 作为参数传递,这样如果我选择slave1STAGE1 上执行作业,如果我选择slave2STAGE2上执行作业,依此类推。

如何使用单个 Jenkins 工作实现这一目标?

我知道有多个配置作业,但我不清楚如何配置它。

如果我得到一些关于它的信息,那将非常有帮助。

continuous-integration build jenkins devops

4
推荐指数
1
解决办法
8685
查看次数

如何将文件添加到解决方案文件夹?

我正在使用此处回答的以下脚本使用 Powershell 脚本在解决方案中创建解决方案文件夹。

Function AddFolderToSolution($folderName, $solutionFile)
{
   $solutionFolderGuid = "{2150E333-8FDC-42A3-9474-1A3956D46DE8}"
   $content = [System.IO.File]::ReadLines($solutionFile)
   $lines = New-Object System.Collections.Generic.List[string]
   $lines.AddRange($content)
   $index = $lines.IndexOf("Global")
   $guid = [System.Guid]::NewGuid().ToString().ToUpper()
   $txt = "Project(`"$solutionFolderGuid`") = `"$folderName`", `"$folderName`", `"$guid`""
   $lines.Insert($index, $txt)
   $lines.Insert($index+1, "EndProject")
   [System.IO.File]::WriteAllLines($solutionFile, $lines)
}

AddFolderToSolution "NewFolder10" "D:\Solution1.sln"
Run Code Online (Sandbox Code Playgroud)

现在我想将一些文件复制到解决方案文件夹(NewFolder10)中。我如何使用 PowerShell 来做到这一点?

powershell solution visual-studio visual-studio-2017

4
推荐指数
1
解决办法
7538
查看次数

docker登录失败:tls:服务器选择了不受支持的协议版本301

docker version 18.09.0, build 4d60db4在Windows计算机上使用,并且尝试使用以下命令登录Artifactory,

docker login docker-registery.company.net
Run Code Online (Sandbox Code Playgroud)

它提示输入用户名和密码,我正在提供它们,但是我无法登录。它给了我以下错误:

Error response from daemon: Get https://docker-registery.company.net/v2/: tls: server selected unsupported protocol version 301
Run Code Online (Sandbox Code Playgroud)

注意:我可以使用相同的用户名和密码通过Web浏览器登录Artifactory Repo Browser。

当我尝试从命令行登录时,是什么导致此问题?是某种代理或证书问题吗?

artifactory docker docker-registry docker-image

4
推荐指数
1
解决办法
1355
查看次数

如何仅使用“更新运行系统”在 Hybris 中运行“ant update”?

ant update构建 Hybris 项目后,我尝试从命令行运行,但它运行更新运行系统从数据库清除 hMC 配置创建基本数据本地化类型(请参阅下图):

hybris 控制台屏幕

有没有办法从命令行运行ant update命令,以便它只选择“更新运行系统”?

我可以传递什么参数ant update来只运行“更新运行系统”而不是任何其他选项?

java ant deployment hybris devops

3
推荐指数
1
解决办法
1万
查看次数