Jenkins Blue Ocean with TFS 2013 & GIT - Saving Pi

2019-08-26 05:53发布

I recently set up Jenkins with the Blue Ocean plugin and have it building off a number of Git repos hosted on our TFS 2013.

I updated the plugins and Jenkins so they are running the latest version.

When I went to add a new pipeline for a new Git repo it is now saying:

"Warning - Saving Pipelines is unsupported using http/https repositories. Please use SSH instead."

When I try to add the pipeline it tells me "Repository URL - Please enter a valid URL.". This is the URL that TFS is giving me to clone the Repo and when I load it in the browser I can view the repo contents so I'm sure this is the correct URL.

Any ideas on how to get around this? I'd like to be able to run latest version of Jenkins and plugins and don't want to downgrade.

Thanks

1条回答
女痞
2楼-- · 2019-08-26 06:20

I can't speak for all cases because I'm using github enterprise. But these steps should be the same for github I believe:

  • Navigate to your github repo and click the clone or download button.
  • The dropdown containing the HTTPS clone link also has a button for SSH which when clicked will give you the ssh url to use for what your trying to do.
  • In the URL field in blue ocean put in "ssh://" without quotes followed by the
    ssh url you copied from github and it should look something like this:

    ssh://user@server:/GitRepo/project.git.

  • Next go to your github instance to your profile settings.

  • Click on SSH and GPG keys and create a new SSH key.
  • Paste in the SSH key information that Jenkins provided in the previous steps
    and click add.

  • Once Done go back over to blue ocean and click create. That's it.

Troubleshooting 1. If you run into an error it may be that the ssh key is still applying in which case just refresh your blue ocean screen and walk through the steps to create it again ignoring the adding of the ssh key to github since you already did that, and it should work.

Troubleshooting 2. Ensure that there isn't an existing jenkinsfile in a branch of the repo that your creating a blue ocean pipeline for.

查看更多
登录 后发表回答