travis deployment Couldn't resolve host - azure-web-app-service

I have setup travis-ci to deploy to azure website, travis use dpl for deployment,
but I get unable to resolve host:
fatal: unable to access 'https://username:!password#https://test-ci.azurewebsites.net/.scm.azurewebsites.net:443/https://test-ci.azurewebsites.net/.git/': Couldn't resolve host 'https'
but the actual git url at azure portal is:
https://username#test-ci.scm.azurewebsites.net:443/test-ci.git

As my test, we only need to provide the site name to the .travis.yml file. It is enough (do not use web app url or git url as the value of site). The following is my deploy part in .travis.yml.
deploy:
provider: azure_web_apps
username: "jambor1" # If AZURE_WA_USERNAME isn't set
password: "***" # If AZURE_WA_PASSWORD isn't set
site: "travistestja" # If AZURE_WA_SITE isn't set
verbose: true
Here is the result:

when you are creating deployment credentials don't use '#' character or other special characters which will break the git repository path created by azure local git deployment.
Follow article https://learn.microsoft.com/en-us/azure/app-service-web/scripts/app-service-powershell-deploy-local-git where you will see that git is using username and password both for connecting to git repository, so if there are some difference in actual repository path in azure portal and in travis ci that is not the actual problem.

Related

Run Gitlab Pages on a relative url

I checked the Gitlab administrator documentation, but they only state sub-urls are forbidden. I currently have gitlab running in a docker container at https://my-domain.com/gitlab and wanted to setup gitlab pages at https://my-domain.com/pages, however I get the following error when starting the container:
FATAL: RuntimeError: Unsupported GitLab Pages external URL path: /pages
In gitlab.rb I configured the following
pages_external_url "https://my-domain.com/pages"
gitlab_pages['enable'] = true
Is there a workaround for this? I can't use a different url.
Gitlab version is gitlab/gitlab-ce:15.1.6-ce.0

fatal: repository 'http://' not found. When i try to execute the pipeline Gitlab CI/CD

When i try to execute the pipeline in gitlab ci, i get an error like fatal: repository 'http://practice-host.dfsystems.ru/gitlab-instance-8435ed1c/objective.git/' not found
enter image description here
My gitlab-runner deployed in kubernetes cluster
enter image description here
Deployed with helm with this yaml file:
enter image description here
I did ssh-keygen in gitlab-runner and added in gitlab ssh-keys, but still not working
This pipeline what i use now
enter image description here
If you have any idea, i will appreciate it <3
Here are some steps you can try to resolve the issue:
Verify the repository URL: Make sure that the URL you're using is correct and that you have access to the repository.
Check the GitLab instance: If you're using a self-hosted GitLab instance, check that it is accessible and reachable from the GitLab CI runner.
Check authentication: If the repository is private, make sure that the GitLab CI runner has the necessary access token or SSH key to clone the repository.
Check network connectivity: Ensure that the GitLab CI runner has network connectivity to the GitLab instance and the repository.

How Azure pipelines can get source from Internal TFS and External Git? How can I update the proxy?

I am setting up Azure Pipelines, I have few that get sources from GitHub and trying to setup pipelines to reach TFS on Intranet, I created a Service Connection of type: “Azure Repos/Team Foundation Server” using this Other Git URL: https://tfs.myCie.com/defaultcollection/MyProject/_versionControl
When I run the pipeline, it takes some time then it displays a 504 Timeout error but the pipeline is still pending. After a while, it goes into error with this message in the step “Checkout repository#master to s”:
git -c http.proxy="http://myProxy.myCie.com:80" fetch --force --tags --prune --progress --no-recurse-submodules origin
fatal: unable to access 'https://tfs. myCie.com/defaultcollection/myProject/_versionControl/': OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to tfs.oecd.org:443
##[warning] Git fetch failed with exit code 128, back off 3.667 seconds before retry.
Security team says that I should use a PAC file to setup the proxy and that should enable intranet and Internet calls but I don’t see how to update the proxy settings of my Self-Hosted Windows Agent.
Can I specify a file? Can there be a configuration for Internet and another one for intranet?
I don’t see how to update the proxy settings of my Self-Hosted Windows
Agent. Can I specify a file?
For the agent you need to create a .proxy file with the proxy URL in the root directory of your agent.
Locate the root directory of your build agent (this is the folder
that contains the run.exe and the _work folder).
Open a Command Prompt at this location.
Type this command, but replace PROXYIP & PORT with your values:
echo http://PROXYIP:PORT > .proxy
Check that your .proxy file is created at the right place:
Optional: If your proxy needs authentication, you must set these
environment variables:
set VSTS_HTTP_PROXY_USERNAME=user
set VSTS_HTTP_PROXY_PASSWORD=password
Restart the service for your build agent.
When you know that you need a proxy at the time of the installation, you can configure the proxy settings right when you call config.cmd:
./config.cmd --proxyurl http://127.0.0.1:8888 --proxyusername "user" --proxypassword "password"
For details, please refer to this blog.
Here is the official document you can refer to.

Permission Denied for deploying in GitHub using travis-CI

I am working on a project which I want to publish in GitHub pages. To automate the deploying process I'm using Travis CI. For this I have created a deploy.sh file, which has the following code.
# build
npm run docs:build
# navigate into the build output directory
cd docs/.vuepress/dist
# if you are deploying to a custom domain
# echo 'www.example.com' > CNAME
git add -A
git commit -m 'deploy'
# if you are deploying to https://<USERNAME>.github.io
# git push -f git#github.com:<USERNAME>/<USERNAME>.github.io.git master
# if you are deploying to https://<USERNAME>.github.io/<REPO>
git push -f git#github.com:<username>/<repo>.git master:gh-pages
cd -
I have added this in my .travis.yml file, which is below
language: nodejs
node_js:
- "lts/*"
before_script:
- npm install
script:
- bash ./scripts/deploy.sh
Now when I push my code to the master, In travis-ci.org it shows that the build is failed, with the following outputs,
Warning: Permanently added the RSA host key for IP address '192.30.253.113' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
The command "bash ./scripts/deploy.sh" exited with 128.
I have followed other SO answers of the same type of errors like this link and also followed the way to generate and adding ssh key to my GitHub account but no success. I will be grateful if you could help me out. Thank you.
If you want to push via ssh then travis needs to have access to the private part of the ssh key you generated. What you want to do is use the travis cli gem to encrypt the private key, add it to your repo and during the deploy stage decrypt it again and use it.
Here's a step-by-step

Can't get information from git server using spring cloud config

I have a Spring Cloud Config project where I connect to my github account, my project works fine but here in my job my boss want to make a git server and use that instead of the github account, so after install git on my server (linux, I created a repository like this:
git init configuracionCarnet
cd configuracionCarnet
git pull <url from github>
git remote add origin user#ip:/home/desarrollo/configuracionCarnetDesarrollo.git
On my Spring cloud config project I change my application.yml like this:
spring:
cloud:
config:
server:
git:
uri: user#ip:/home/desarrollo/configuracionCarnet.git
username: user
password: password
server:
port: 8001
I run the project and starts ok but when I execute the http://localhost:8001/health it throws that the project is down so I can't connect to the git server, what am I doing wrong?,
Thanks in advance
You do not create a server with …remote add….
You also do not create a server with your Spring config by putting a non-existent URL into your config.
Possibilities:
Hide GitHub with Spring by putting your GitHub URL in your Spring config, as you did before.
Hide GitHub with a Gitblit mirror (you have to install Gitblit and google a bit)
Use Gitblit as a substitute for GitHub.

Resources