Azure DevOps – Pipelines to intranet TFS 2018: SSL_ERROR_SYSCALL - azure

I am setting up Azure Pipelines, I have few that get sources from GitHub and trying to setup pipelines to reach TFS on intranet for some time.
I started anew, I created a new PAT token in TFS with full access.
I created a new Service Connection of type: “Azure Repos/Team Foundation Server” using this URL: https://tfs.myCie.com/defaultcollection/MyProject and the PAT token from TFS above.
I created a new pipeline, selecting Other Git and using the new service connection. I didn’t know what to use as default branch as I don’t see any branches on TFS so I used master.
I used the empty job option and entered again the service connection name and the master branch. When I tried to select the YAML template, it wasn’t able to save it to a repo, should I have a different repo for Yaml files to TFS?
I paid attention that my .proxy file was filled and the .proxybypass file had the TFS server URL.
When I run the pipeline, early on the UI gives a timeout but after 6-7 minutes, I have logs that says:
Syncing repository: repository (ExternalGit)
##[debug]repository url=https://tfs.myCie.com/defaultcollection/myProject/
##[debug]targetPath=D:\Agent_work\19\s
git version 2.26.2.windows.1
git remote add origin https://tfs.myCie.com/defaultcollection/myProject/
##[debug]Finished process 6888 with exit code 0.
git config --get-all http.https://tfs. myCie.com/defaultcollection/myProject/.extraheader
If I test this .ExtraHeader URL, it either doesn’t exist or I don’t have access !
git config --get-all http.proxy
git remote set-url origin https://emptyusername:***#tfs. myCie.com/defaultcollection/myProject/
fatal: unable to access 'https://tfs.myCie.com/defaultcollection/myProject/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to tfs.oecd.org:443
Can it be a proxy error or a user access account ?
In the later case, what access rights would I need ?
What settings I should use when creating the PAT token in TFS ?
Thanks.

I am afraid you were using the wrong serve connection type.
Azure Repos/Team Foundation Server service connection is used in the repositories resources section in the yaml pipeline, which you can refer to the repositories in other organizations using a service connection. See this document for more informaiton.
resources:
repositories:
- repository: otherrepo
name: ProjectName/RepoName
endpoint: newTFSServiceConnection
steps:
- checkout: self
- checkout: otherrepo
If you want to set up a pipeline for a repos in another TFS server. You need to create a new Service Connection of type Other Git
And enter the tfs repo url and users name / password in the edit page.
Then you can select this Other git type Service connection when creating a pipeline.
If you cannot connect to your tfs repo via PAT. It might be because the IIS Basic Authentication is enabled on your windows machine, it prevents you from using personal access tokens (PATs) as an authentication mechanism. See here, You can try using basic anthentication method (username and password) instead
Please be noted that you need to run this pipeline on your self-hosted agent. As you are trying to connect to the repo on your tfs intranet server. Cloud Microsoft hosted agent cannot connect to your intranet tfs server. Unless it is can be accessed in the public network.

Related

Connect TeamCity with Azure DevOps

I would like to have a TeamCity build operation in combination with Azure DevOps. I have already tried different options, but I always get a connection error.
I have tried the following options:
-VCS Root
-Connection (Azure DevOps PAT & OAuth 2.0)
Is a specific user required to access TeamCity and how do I need to configure the VCS Root correctly?
I have used Git as VCS type and Uploaded Key as authentication method.
Error:
Connection timeout: connection

Unable to access identity settings. When using git-gateway backend make sure to enable Identity service and Git Gateway - Netlify

When using Netlify the authentication fails and I got the message:
Unable to access identity settings.
When using git-gateway backend make sure to enable Identity service and Git Gateway.
You must reconnect the repo, and reactivate the git gateway, to it back to work.
Go to Settings > Build & deploy > Continuous Deployment > Build settings to re-link the repository.
Go to Settings > Identity > Services > Git Gateway to add a new API access token following the instructions in the section above.
Wait it rebuild and it should work properly.
It may happen after change repository permissions or netlify password, change ownership on your repository, or convert a repository from public to private.

Azure Data Factory GitHub Integration Private Repo

I only seem able to integrate my ADFv2 instance with public repos in my organisation, which is undesirable.
In the documentation (https://github.com/MicrosoftDocs/azure-docs/blob/master/articles/data-factory/source-control.md#author-with-github-integration), it states that:
..can use both public and private GitHub repositories with Data Factory as long you have read and write permission to the repository..
So, i complete the following steps:
Navigate to my GitHub Org.
Create a new "Private" repo, initialised w/ README.MD.
Create a new "Internal" repo, initialised w/ README.MD. (this is GitHub Enterprise Cloud)
In the Azure Portal, create a new ADFv2 instance without Git integration.
Click "Set up code repository" in the ADFv2 instance.
Choose, RepoType: GitHub - Authenticate w. GitHub pop-up.
Enter org name in to the GitHub Account section.
Git repo name: No results found
🤷🏼‍♂️
The solution turned out to be the need to grant access as an Authorized OAuth App to the organisation. I did not have permission to do this.
You can then find it under 'Applications' once done.. but i think when you first connect up your ADF to GitHub, it prompts you if you would like to grant it.
I was not seeing this due to permissions on the Org.

App Service Editor in Azure

The App Service Editor (Preview) in Azure
When I 'Initialize Git Repository', where is my git repository created? Is there a repository URL that I can use?
And if later, after finish changing my code, I want to export repository (e.g., get a copy to my local machine), how can I do that?
You can access the git repository through command line or via the URL given in your instance dashboard in properties
there should be a Git URL field there.

Git deploy to Azure app service from Gitlab fails

I am attempting to deploy to an Azure app service from Gitlab but ran into a problem. The deployment fails immediatley with:
Host key verification failed.\r\nfatal: Could not read from remote
repository.\n\nPlease make sure you have the correct access
rights\nand the repository exists.\n\r\nD:\Program Files
(x86)\Git\cmd\git.exe fetch origin --progress
I've deleted the deployment configuration in the App service a few times and recreted to make sure the SSL URL for the Gitlab repository is correct. I've also tried addkng my key into the Gitlab deployment keys but it wont let me as its already there, so I knw the key is definitely correct.
Searching around on the web suggests to remove the host from the known hosts file, but as this is on azure there is no known_hosts in the /ssh folder (Kudu->Console->D:\home\.ssh) so I'm not sure what else to try.
Thanks

Resources