我找了下gogs的配置文件,如下 BRAND_NAME = Gogs RUN_USER = git RUN_MODE = prod [database] TYPE = sqlite3 HOST = 127.0.0.1:5432 NAME = gogs USER = gogs PASSWORD = SSL_MODE = disable PATH = data/gogs.db [repository] ROOT = /data/git/gogs-repositories [server] DOMAIN = 10.30.29.101 HTTP_PORT = 3000 EXTERNAL_URL = http://git.sl-express.com/ DISABLE_SSH = false SSH_PORT = 22 START_SSH_SERVER = false OFFLINE_MODE = false [mailer] ENABLED = false [service] REGISTER_EMAIL_CONFIRM = false ENABLE_NOTIFY_MAIL = false DISABLE_REGISTRATION = false ENABLE_CAPTCHA = true REQUIRE_SIGNIN_VIEW = false [picture] DISABLE_GRAVATAR = false ENABLE_FEDERATED_AVATAR = false GRAVATAR_SOURCE=https://sdn.geekzu.org/avatar/ [session] PROVIDER = file [log] MODE = file LEVEL = Info ROOT_PATH = /app/gogs/log [security] INSTALL_LOCK = true SECRET_KEY = pzBX8HdBNLgTisW 讯飞的星火说在Docker容器中启动的Jenkins配置文件通常位于/var/jenkins_home/config.xml。找出来却只有页面的.xml。然后又说Jenkins一般在/var/jenkins_home/gogs目录下的config.xml文件中配置和Gogs相关的配置,没有。 但是在git clone的时候 could not create work tree dir 'project-slwl-admin-vue': Permission denied 没有权限。就是不知道root用户的密码,不然还能改。 但是在下载一个空目录的时候就行, jenkins@1d7133ffbf66:/tmp$ git clone http://10.30.29.101:10880/sl/sl-express-gitflow-web.git Cloning into 'sl-express-gitflow-web'... remote: Enumerating objects: 3, done. remote: Counting objects: 100% (3/3), done. remote: Total 3 (delta 0), reused 0 (delta 0) Unpacking objects: 100% (3/3), 226 bytes | 226.00 KiB/s, done. 但是在 jenkins 页面中 构建项目 拉取还是 stderr: fatal: unable to access 'http://git.sl-express.com/sl/sl-express-gitflow-web.git/': Failed to connect to git.sl-express.com port 80: Connection refused at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2671) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2096) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:618) at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:847) at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1226) at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1308) at hudson.scm.SCM.checkout(SCM.java:540) at hudson.model.AbstractProject.checkout(AbstractProject.java:1239) at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:647) at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:85) at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:519) at hudson.model.Run.execute(Run.java:1899) at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:44) at hudson.model.ResourceController.execute(ResourceController.java:107) at hudson.model.Executor.run(Executor.java:449) ERROR: Error cloning remote repo 'origin' Finished: FAILURE