Re: Tagging code in a pipeline?

2019-03-23 Thread Mark Waite
https://jenkins.io/doc/pipeline/examples/#push-git-repo gives an example of both https and ssh On Saturday, March 23, 2019 at 11:20:27 AM UTC-6, Rade Milijasevic wrote: > > Can somebody please give an example code for both https:// url and ssh > approach. > thanks > > On Fri, Mar 22, 2019 at

Re: Tagging code in a pipeline?

2019-03-23 Thread Mark Waite
https://jenkins.io/doc/pipeline/examples/#push-git-repo provides examples of ssh and https. Mark Waite On Thursday, March 21, 2019 at 12:51:42 PM UTC-6, Robert Nicholson wrote: > > I am able to tag the code locally but the push with credentials key based > seems to be an issue. > >

Re: Tagging code in a pipeline?

2019-03-23 Thread Rade Milijasevic
Can somebody please give an example code for both https:// url and ssh approach. thanks On Fri, Mar 22, 2019 at 5:11 PM Robert Nicholson wrote: > I haven’t tried any ssh: url based approach yet. > > but the approaches I’ve seen are when you use GIT_SSH etc to inject your > own private key into

Re: Tagging code in a pipeline?

2019-03-22 Thread Robert Nicholson
I haven’t tried any ssh: url based approach yet. but the approaches I’ve seen are when you use GIT_SSH etc to inject your own private key into the ssh that was extracted using withCredentials and written to a tmp folder on disk temporarily but I see no indication that it’s ever using this key.

Re: Tagging code in a pipeline?

2019-03-22 Thread Ivan Fernandez Calvo
for the https case, there is an example at https://jenkins.io/doc/pipeline/examples/#push-git-repo El viernes, 22 de marzo de 2019, 15:00:47 (UTC+1), Robert Nicholson escribió: > > Ok it’s a https: url > > So how do you construct the appropriate > > ssh command then? > > all examples that use

Re: Tagging code in a pipeline?

2019-03-22 Thread Mark Waite
Most git repository providers (GitHub, Bitbucket, Gitlab, Visual Studio, Gitea, Assembla, Beanstalk,etc.) provide a small UI component that will allow you to toggle between the https URL to the repository and the ssh URL to the repository. For example, the GitHub box looks like this: [image:

Re: Tagging code in a pipeline?

2019-03-22 Thread Robert Nicholson
Ok it’s a https: url So how do you construct the appropriate ssh command then? all examples that use withCredentials seems to fail on my side. > On Mar 21, 2019, at 1:55 PM, Mark Waite wrote: > > Is the repository URL an ssh URL? If not, then sshagent won't help. The ssh > agent does

Re: Tagging code in a pipeline?

2019-03-21 Thread Mark Waite
Is the repository URL an ssh URL? If not, then sshagent won't help. The ssh agent does not do http or https On Thu, Mar 21, 2019 at 12:51 PM Robert Nicholson < robert.nichol...@gmail.com> wrote: > I am able to tag the code locally but the push with credentials key based > seems to be an issue.

Tagging code in a pipeline?

2019-03-21 Thread Robert Nicholson
I am able to tag the code locally but the push with credentials key based seems to be an issue. sshagent([‘credentialsKey]) { sh “git push origin master —tags” } this step errors with fatal: could not read Username for ‘repository hostname’ : No such device or address Prior in my pipeline