---
title: "【Jenkins】各种权限问题（Permissions）"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/jenkins-permissions-issues/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/03-软件工程与质量保障/CI-CD与质量保障/CI-CD工具链/【Jenkins】各种权限问题（Permissions）.md"
content_hash: 912d7fe3ec6ab619bfb713721e9ff39e393cfadcf07775f55ce1d43db976f46e
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 【Jenkins】各种权限问题（Permissions）

﻿# 【Jenkins】各种权限问题（Permissions）

> 创建时间：2021/8/30 21:47

* Python打开文件读写权限的问题
  * VisualSVN仓库，在mac节点上无法拉取的问题
    * svn配置与使用问题
      * 503 Service Unavailable
  * 使用Git仓库创建pipeline，SSH访问git，子节点上拉取失败的问题
  * SCM操作问题
    * git pull需要用户名密码的问题
    * svn up即使输入了用户名密码也报错的问题
    * svn update需要用户名密码的问题
      * Windows上
      * Mac上——已解决，需要解锁keychain，或者改subversion文件

## Python打开文件读写权限的问题

报错信息：

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

一般情况下，是可以成功打开文件进行写操作的。只有在设置中关闭了SYSTEM用户的权限时，才会出现Jenkins打开文件时没有权限的问题。可以右键所在文件夹，查看属性，看看SYSTEM用户对文件有没有控制权限，没有的话打开就行了。

## VisualSVN仓库，在mac节点上无法拉取的问题

### svn配置与使用问题

如果配置了协议为http，访问的方式为https，会报错：

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

只要checkout用的协议头与Server上设置的一致，就可以成功checkout，并且使用Jenkins都可以访问。

#### 503 Service Unavailable

服务器宕机，重新尝试可能就好了。

The HyperText Transfer Protocol (HTTP) 503 Service Unavailable server error response code indicates that the server is not ready to handle the request.

Common causes are a server that is down for maintenance or that is overloaded. This response should be used for temporary conditions and the Retry-After HTTP header should, if possible, contain the estimated time for the recovery of the service.

## 使用Git仓库创建pipeline，SSH访问git，子节点上拉取失败的问题

## SCM操作问题

### git pull需要用户名密码的问题

### svn up即使输入了用户名密码也报错的问题

报错内容：

```csharp
string a = &quot;test&quot;;
string tmp = &quot;est&quot;;
string b = &quot;t&quot; + tmp;
Console.WriteLine(string .ReferenceEquals(str1, str2));

```

详细的解释与处理方法：
http://www.microhowto.info/howto/configure_subversion_to_trust_a_given_ssl_certificate.html

方法一：将链接改为http协议，就不需要证书了
方法二：下载svn server的证书，在Jenkins所属的用户目录下，找到Subversion文件夹，在servers文件中按照以上链接中的方法进行设置。

> Subversion文件夹所在的位置：
>  Windows: ...\user_a\AppData\Roaming\Subversion
>  Linux: ~/.subversion

### svn update需要用户名密码的问题

#### Windows上

用户名密码会以一定的方法保存在Subversion目录中（...\user_a\AppData\Roaming\Subversion），只需要在第一次运行时

#### Mac上——已解决，需要解锁keychain，或者改subversion文件
