When I execute my Jenkins pipeline, during the repository clone stage, it crashes and the error message is:
Failed to start websocket connection io.fabric8.kubernetes.client
Not sure if it's because of the way I am cloning the repo or a VPN issue (as I am working on a company laptop which uses a company VPN).
Changed the way I cloned the repo, used both HTTP and SSH. Currently I am cloning the repo like this in the pipeline: sh "git clone -b BRANCH_NAME REPO_URL"
Related
i have project jenkins to deploy to my remote server, my local machine and my remote server was connected with ssh but when i try to build job on jenkins, i am getting error like this
image
Login on your jenkins and then try to connect manually on the command line with ssh from jenkins to the remote server. Then approve the host key of the remote system. Run again your job. Then I think everything should be fine.
i am trying to run pipeline on bitbucket, for my nodejs app, and i have some issue on deployment step (aws ec2). Pipeline runs in container, ssh-ing to my instance on aws, and then try to git clone my app, by command
git clone https://my_bitbucketusername:my_bitbuckettoken#bitbucket.org/somevendor/somerepo
but it is not good option to provide token in script, so i tried to set token as repository variable like $BITBUCKET_TOKEN,
git clone https://my_bitbucketusername:$BITBUCKET_TOKEN#bitbucket.org/somevendor/somerepo
but then i faced with bitbucket failed authentification. Same issue on gitlab, whad i do wrong?
in TFS (Azure Pipelines) I have a task to run nukeeper repo command:
nukeeper repo "https://bitbucket.xxx.com/scm/myproject/myrepo.git" <token> --api "https://bitbucket.xxx.com/scm/myproject/myrepo.git" --consolidate --source https://tfs/tfs/XXX/_packaging/main/nuget/v3/index.json --verbosity detailed
The command starts succesfully, repo is cloned, updates detected, a new branch created changes committed and pushed, BUT it seems only locally.
When NuKeeper tries to create a new pull request, an exception is thrown.
In logs:
OpenPullRequest: Error NotFound 2021-03-22T16:41:31.1464196Z Response NotFound is not success, body: 2021-03-22T16:41:31.1465586Z Updates failed NuKeeperException : OpenPullRequest: Error NotFound 2021-03-22T16:41:31.1466638Z {"errors":[{"context":null,"message":"Repository \"xxx\" of project with key \"xxx\" has no branch \"nukeeper-update-3-packages-9F8F13D133529FB443D130FFB8330A78\"","exceptionName":"com.atlassian.bitbucket.commit.NoSuchCommitException"}]}
Locally there is a temp folder with name corresponding cloned repo and branch
If you use TFS (on-premises Azure DevOps Server), you could login the build agent machine, and run the commands locally, to see whether you would reproduce the issue.
The error indicated "Repository \"xxx\" of project with key \"xxx\" has no branch \"nukeeper-update-3-packages-9F8F13D133529FB443D130FFB8330A78\", you could check whether the branch exists on the server.
I am trying to connect Jenkins with GitLab, both are installed on the same Unix server, in Jenkins Manager System the connection is successful. But in Job when I put the URL in the Repository URL it gives an error message:
"Failed to connect to repository: Command" git ls-remote -h "
We are trying via http: // localhost, but we have already tried to use the domain https://git.MYCLIENT.org.br/REPOSITORY.git, we also have SSH, we use PRIVATE KEY SSH, we use ACCESS TOKEN from GIT, we have done all settings to do. Even so, continue with this mistake!
I am completely new to Gitlab because previously I upload project to server using Filezilla. But now I have finished my Laravel projects in my local computer, and I would like to upload it to my could hosting. Currently my project is stored in c:\\xampp\htdocs\myproject.
Please tell me command line step-by-step to achieve this? I am using Putty on window. I can't understand it by reading existing tutorial.
I use DigitalOcean.com's server and yes I registered on gitlab.com to store/upload my project.
As a first approach, you can push directly to DigitalOcean, as describe in this tutorial:
clone your GitLab repo as a bare repo on your DigitalOcean instance (VPS: Virtual Private Server or Droplet)
cd
git clone --bare https://gitlab.com/<yourUsername>/<yourRepo.git>
add a post-receive hook similar to this auto-deploy article
That is:
cat > /home/rails/rails_project.git/hooks/post-receive
(Copy-paste the following lines)
#!/bin/sh
echo "-----------------------------------"
echo "Post receive hook: Updating website"
export GIT_WORK_TREE=/path/to/yourProject
export GIT_DIR=/home/yourUser/yourRepo.git
cd $GIT_WORK_TREE
git pull
git checkout master -f
(type Ctrl+D to exit)
Depending on your deployment path, you might have to execute the git commands as root, but it is best if you can keep your deployment as your username and not root.
But if you don't want to push to DigitalOcean, only to GitLab, you can use instead Git-Auto-Deploy.
Then you can push to GitLab, and that will trigger a deployment to your VPS.
When commits are pushed to your Git repository, the Git server will notify Git-Auto-Deploy by sending a HTTP POST request with a JSON body to a pre configured URL (your-host:8001).
The JSON body contains detailed information about the repository and what event that triggered the request.
Git-Auto-Deploy parses and validates the request, and if all goes well it issues a git pull.
Additionally, Git-Auto-Deploy can be configured to execute a shell command upon each successful git pull, which can be used to trigger custom build actions or test scripts.