Sebastian Solidwork
Sebastian Solidwork

Reputation: 107

How do i push to the git-repo of Scriptler?

From https://wiki.jenkins-ci.org/display/JENKINS/Scriptler+Plugin

Git Scriptler exposes its scripts via git. Browse to JENKINS_URL/scriptler.git on your installation to get more info about how to access the repo via git.

This allows an administrator to push/pull scripts from its workstation/IDE into Scriptler. If such a script is pushed the first time into scriptler, then it will parse the optional header info like this:

I have the scriptler-plugin on my jenkins and want to push changes to it. Cloning/Pulling works even anonymously.

I have configured my username in git, but the server responeded error 403, that a push as anonymous is not allowed. I'm trying to push over http.

My jenkins runs on windows and i havent configured any ssh-software explicit. My own computer is windows too and i have the git client installed. Additionally tortoise-git.

I dont know what i'm doing wrong. How i have to communicate my username and password?

Upvotes: 3

Views: 1601

Answers (1)

Eagle_Rainbow
Eagle_Rainbow

Reputation: 21

Just figured it out myself:

  • Make sure that your user has a public SSH key assigned (see https://jenkins.server/jenkins/user/username/configure )
  • Make sure that your local ssh installation has the corresponding private key for the public key (cf. ~/.ssh/id_rsa)
  • Don't use https, but use the ssh protocol for your git repo to push (cf. ssh://jenkins.server:34841/scriptler.git)

Then, you are able to push the changes as usual

(if checked out before)

git push origin HEAD:refs/heads/master

(or if pushing from some other repository)

git push ssh://jenkins.server:34841/scriptler.git HEAD:refs/heads/master

Upvotes: 2

Related Questions