我试图发送一个报告,其中包含开发人员每天在git存储库中完成的提交计数.
#read all the inputs
read -p "Enter the Branch Name:" branchname
read -p "Enter the from date:" frmdate
read -p "Enter the To date:" todate
#execute the command to get the commit history
git log origin/$branchname --name-status --pretty=format:"%cn committed %h on %cd full" --after="$frmdate 00:00" --before="$todate 23:59" --decorate | git shortlog -s -n > history.txt
Run Code Online (Sandbox Code Playgroud)
这个脚本帮助我创建一个文件,其中包含在给定日期更改的文件和由谁更改的文件.但我需要由独立开发者提交的提交数量.
我尝试过git shortlog -s -n,它给出了所有分支机构中开发人员的总体提交次数.
需要创建报告以每天获取每个开发人员的提交计数
Jenkins 2.7.4安装在RedHat服务器中,Linux Slaves通过选择"通过执行命令在主服务器上启动代理"选项进行配置.我们创建了一个Shell脚本,它在Jenkins版本2.7.4中运行良好.
现在我们将Jenkins升级到2.121.1.现在,同一个脚本会抛出错误
<=== [JENKINS REMOTING CAPACITY] ===>线程"main"中的异常java.io.StreamCorruptedException:无效的流标题:java.io的java.io.ObjectInputStream.readStreamHeader(ObjectInputStream.java:808)中的099EACED. ObjectInputStream的.(ObjectInputStream.java:301)在hudson.remoting.ObjectInputStreamEx.(ObjectInputStreamEx.java:48)在hudson.remoting.ChannelBuilder.makeTransport(ChannelBuilder.java:478)在hudson.remoting.ChannelBuilder.negotiate(ChannelBuilder.java :433)at hudson.remoting.ChannelBuilder.build(ChannelBuilder.java:354)at hudson.remoting.Launcing.main(Launcher.java:743)at hudson.remoting.Launcher.runWithStdinStdout(Launcher.java:691)at hudson .remoting.Launcher.run(Launcher.java:373)at hudson.remoting.Launcher.main(Launcher.java:283)错误:连接已终止错误:启动代理时出现意外错误.这可能是詹金斯java.io.IOException的错误:在hudson.remoting在hudson.remoting.ChunkedInputStream.readUntilBreak(ChunkedInputStream.java:99)在hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)意外EOF. AbstractSynchronousByteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)在hudson.remoting.SynchronousCommandTransport $ ReaderThread.run(SynchronousCommandTransport.java:63)ERROR:进程终止,退出代码1 java.io.IOException的:在hudson.remoting.ChunkedInputStream意外EOF. readUntilBreak(ChunkedInputStream.java:99)位于hudson.remoting.AbstractSynteArrayCommandTransport.read(AbstractSynchronousByteArrayCommandTransport.java:35)的hudson.remoting.ChunkedCommandTransport.readBlock(ChunkedCommandTransport.java:39)hudson.remoting.SynchronousCommandTransport $ ReaderThread.run(SynchronousCommandTransport) .java:63)另外:hudson.remoting.Channel $ CallSiteStackTrace:远程调用rtt- cud-euhrhd0036vdeas at hudson.remoting.Channel.attachCallSiteStackTrace(Channel.java:1741)at hudson.remoting.Request.call(Request.java:202)at hudson.remoting.Channel.call(Channel.java:954)at hudson .slaves.SlaveComputer.setChannel(SlaveComputer.java:549)在hudson.slaves.SlaveComputer.setChannel(SlaveComputer.java:416)在hudson.slaves.CommandLauncher.launch(CommandLauncher.java:153)在hudson.slaves.SlaveComputer $ 1 .CALL在java.util.concurrent.FutureTask中(SlaveComputer.java:288)在jenkins.util.ContextResettingExecutorService $ 2.call(ContextResettingExecutorService.java:46)在jenkins.security.ImpersonatingExecutorService $ 2.call(ImpersonatingExecutorService.java:71).运行(未知来源)java.util.concurrent.ThreadPoolExecutor.runWorker(未知来源)java.util.concurrent.ThreadPoolExecutor $ Worker.run(未知来源)java.lang.Thread.run(未知来源)引起:hudson在hudson.remoting.Channel的hudson.remoting.Request.abort(Request.java:340)上的.remoting.RequestAbortedException.终止(Channel.java:1038)在hudson.remoting.SynchronousCommandTransport $ ReaderThread.run(SynchronousCommandTransport.java:96)
如果我在Manage Jenkins - > Configure Security中禁用SSHD端口,那么我就可以启动我的slave.但是在我的脚本中,我将使用Jenkins-cli.jar触发一个作业,将二进制文件从master复制到slave.
java -jar jenkins-cli.jar -s http://localhost:8080 --ssh -user username -i ~/.ssh/id_rsa build RTT/RTT-CI-Tools/RTT-CI-Tools-Distribute -s -p SLAVE_REGEX=slave name
我收到的消息是
"WARNING: No header 'X-SSH-Endpoint' returned by Jenkins"
Run Code Online (Sandbox Code Playgroud)
并且构建不会被触发.我也尝试过在jenkins-cli.jar命令中将-ssh替换为-http,
java -jar jenkins-cli.jar -s …
我已经使用源代码在RHEL7服务器中安装了Graphite。我已经在Postgresql中创建了一个数据库。使用Postgresql数据库修改了local_settings.py。
当我执行以下命令进行同步时,会引发错误
PYTHONPATH=/app/graphite/webapp django-admin.py migrate --settings=graphite.settings --run-syncdb
Run Code Online (Sandbox Code Playgroud)
错误:
Traceback (most recent call last): File "/usr/local/bin/django-admin.py", line 4, in <module>
__import__('pkg_resources').run_script('Django==2.2.1', 'django-admin.py') File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 666, in run_script
self.require(requires)[0].run_script(script_name, ns) File "/usr/local/lib/python3.7/site-packages/pkg_resources/__init__.py", line 1446, in run_script
exec(code, namespace, namespace) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/EGG-INFO/scripts/django-admin.py", line 5, in <module>
management.execute_from_command_line() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/__init__.py", line 381, in execute_from_command_line
utility.execute() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/__init__.py", line 375, in execute
self.fetch_command(subcommand).run_from_argv(self.argv) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/base.py", line 323, in run_from_argv
self.execute(*args, **cmd_options) File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/base.py", line 361, in execute
self.check() File "/usr/local/lib/python3.7/site-packages/Django-2.2.1-py3.7.egg/django/core/management/base.py", line 390, in check …Run Code Online (Sandbox Code Playgroud) 我已经在RHEL7服务器中安装了Graphite。我已经在Graphite local_settings.py中完成了LDAP配置
## LDAP / ActiveDirectory authentication setup
USE_LDAP_AUTH = True
LDAP_SERVER = "ldap-test.com"
LDAP_PORT = 389
#LDAP_USE_TLS = False
## Manual URI / query setup
LDAP_URI = "ldap://ldap-test.com:389"
LDAP_SEARCH_BASE = "ou=xxxxx,dc=zxxxx"
LDAP_BASE_USER = "uid=xxxx,ou=xxxxx,cn=xxxxx"
LDAP_BASE_PASS = "xxxxx"
LDAP_USER_QUERY = "(sAMAccountName=%s)" #For Active Directory use "(sAMAccountName=%s)"
# User DN template to use for binding (and authentication) against the
# LDAP server. %(username) is replaced with the username supplied at
# graphite login.
LDAP_USER_DN_TEMPLATE = "cn=% (username),ou=xxxxx,dc=xxxxx"
# If you want …Run Code Online (Sandbox Code Playgroud) 我有一个用于自定义Jenkins主服务器的Dockerfile,如下所示:
FROM jenkins/jenkins:lts
USER root
ENV http_proxy http://xx.xx.xx.xx:8080
ENV https_proxy http://xx.xx.xx.xx:8080
RUN apt-get update
RUN apt-get install -y --allow-unauthenticated ldap-utils curl wget vim nano sudo git
RUN adduser jenkins sudo
User jenkins
ENV http_proxy http://xx.xx.xx.xx:8080
ENV https_proxy http://xx.xx.xx.xx:8080
COPY plugins.txt /usr/share/jenkins/ref/plugins.txt
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt
RUN echo 2.176.2 > /usr/share/jenkins/ref/jenkins.install.UpgradeWizard.state
RUN echo 2.176.2 > /usr/share/jenkins/ref/jenkins.install.InstallUtil.lastExecVersion
EXPOSE 9081
EXPOSE 50000
Run Code Online (Sandbox Code Playgroud)
我预计插件将在docker build命令期间安装
docker build --no-cache -t jenkins .
但是install-plugins.sh无法安装插件
-max-time 60 https://updates.jenkins.io/download/plugins/structs-plugin/1.5/structs-plugin.hpi -o /usr/share/jenkins/ref/plugins/structs-plugin.jpi)
Failed to download plugin: structs or structs-plugin …Run Code Online (Sandbox Code Playgroud) 我已经生成了个人访问令牌,并且我拥有 gitlab 中特定存储库的维护者访问权限。我使用下面的 API 来删除管道
curl --header "PRIVATE-TOKEN: <mytoken>" --request "DELETE" https://gitlab.test.com/api/v4/projects/8/pipelines/5461
Run Code Online (Sandbox Code Playgroud)
我收到 403 错误。如何解决此问题
我在Windows 7中使用TortoiseGit和MsysGit.我需要将存储库从github克隆到我的桌面.我右键单击 - > Git Clone-> https://github.com/username/sample.git.我得到的回复如下:
Cloning into 'D:\repo\sample'...
error: The requested URL returned error: 407 while accessing https://github.com/TruMobi/sample.git/info/refs?service=git-upload-pack
fatal: HTTP request failed
Run Code Online (Sandbox Code Playgroud)
我在TortoiseGit中完成了代理设置.请帮我解决这个问题.
我被这个问题困住了,我不知道解决它。
我编写了一个 Shell 脚本,它将通过传递我的私钥来使用 Jenkins CLI 调用我的工作。Jenkins 版本是 2.121.1
java -jar jenkins-cli.jar -s http://localhost:8080 -i ~/.ssh/id_rsa build RTT/RTT-CI-Tools/RTT-CI-Tools-Distribute -s -p SLAVE_REGEX=testserver
Run Code Online (Sandbox Code Playgroud)
获取错误消息为:
ERROR: anonymous is missing the Overall/Read permission
Run Code Online (Sandbox Code Playgroud)
相同的脚本适用于另一个 Jenkins (2.7.4)。如何解决这个问题。
jenkins ×4
git ×2
graphite ×2
shell ×2
django ×1
docker ×1
github ×1
gitlab ×1
gitlab-ci ×1
jenkins-cli ×1
launch-agent ×1
linux ×1
python-3.x ×1
rhel7 ×1
ssh-keys ×1
tortoisegit ×1