I am facing a problem in initializing a repo, which throws the following errors - repo

Whenever I do a repo init, I am getting the following errors and not able to get the repo. Here I am doing repo init based on the latest tag.
repo command :
repo init -u ssh://10.xxx.xx.xx:xxxxx/test-manifest -b ref/tags/development -m lat_dev.xml
fatal: Cannot get
https://gerrit.googlesource.com/git-repo/clone.bundle
fatal: error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify
failed (_ssl.c:590)
fatal: cloning the git-repo repository failed, will remove
'.repo/repo'
Could anyone help me out in this problem?

Related

keytar.node causing issues in Buildkite pipeline

I'm trying to create a CI/CD pipeline using buildkite where the build steps runs on a Virtual Machine (Ubuntu). However, an npm package called keytar which is a dependency of tedious library is causing issues in the pipeline.
When running one of the steps from using the buildkite-agent, it tries to clean up an existing repository. And during the command git clean -fxdq it fails to remove keytar.node file due to a Permission denied Error.
Here's a full log of the step:
> Running global environment hook
> Setting up plugins
> Preparing working directory
$ cd /var/lib/buildkite-agent/builds/build-server-1/someorg/some-repo
# Host "bitbucket.org" already in list of known hosts at "/var/lib/buildkite-agent/.ssh/known_hosts"
$ git remote set-url origin git#bitbucket.org:someorg/some-repo.git
$ git clean -fxdq
warning: failed to remove node_modules/keytar/build/Release/keytar.node: Permission denied
# Removing /var/lib/buildkite-agent/builds/build-server-1/someorg/some-repo
⚠️ Warning: Checkout failed! Error running `/usr/bin/git clean -fxdq`: exit status 1 (Attempt 1/3 Retrying in 2s)
# Host "bitbucket.org" already in list of known hosts at "/var/lib/buildkite-agent/.ssh/known_hosts"
$ git clone -v -- git#bitbucket.org:someorg/some-repo.git .
fatal: destination path '.' already exists and is not an empty directory.
# Removing /var/lib/buildkite-agent/builds/build-server-1/someorg/some-repo
⚠️ Warning: Checkout failed! Error running `/usr/bin/git clone -v -- git#bitbucket.org:someorg/some-repo.git .`: exit status 128 (Attempt 2/3 Retrying in 2s)
# Host "bitbucket.org" already in list of known hosts at "/var/lib/buildkite-agent/.ssh/known_hosts"
$ git clone -v -- git#bitbucket.org:someorg/some-repo.git .
fatal: destination path '.' already exists and is not an empty directory.
# Removing /var/lib/buildkite-agent/builds/build-server-1/someorg/some-repo
⚠️ Warning: Checkout failed! Error running `/usr/bin/git clone -v -- git#bitbucket.org:someorg/some-repo.git .`: exit status 128 (Attempt 3/3 Retrying in 2s)
# Skipping artifact upload, no checkout
🚨 Error: Error running `/usr/bin/git clone -v -- git#bitbucket.org:someorg/some-repo.git .`: exit status 128
Upon examining the permissions on the folder /some-repo using the ls -l command the permissions seem to be drwxr-xr-x and the owner is buildkite-agent. I'm stumped as how this file does not get deleted while all other files get deleted without any issue.

I am running command "terraform init" but getting this error, while in other folder within same machine this command is working perectly

I am running command "terraform init" but getting this error, while in other folder within same machine this command is working perectly and also other terraform command is also working.
Error while installing terraform-aws-modules/http v2.4.1: could not query
provider registry for registry.terraform.io/terraform-aws-modules/http: failed
to retrieve authentication checksums for provider: the request failed after 2
attempts, please try again later: Get
"https://github.com/terraform-aws-modules/terraform-provider-http/releases/download/v2.4.1/terraform-provider-http_2.4.1_SHA256SUMS":
context deadline exceeded

semantic-release: fatal: tag 'vX.Y.Z' already exists

Trying to set up semantic-release/gitlab, I'm getting this in my GitLab logs,
Error: Command failed with exit code 128: git tag v1.0.0 2c30602010d7d9f26cc0880b988ff9de6405daa5
fatal: tag 'v1.0.0' already exists
at makeError (/builds/myProject/angular-validators/node_modules/semantic-release/node_modules/execa/lib/error.js:60:11)
at handlePromise (/builds/myProject/angular-validators/node_modules/semantic-release/node_modules/execa/index.js:118:26)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async tag (/builds/myProject/angular-validators/node_modules/semantic-release/lib/git.js:224:3)
at async run (/builds/myProject/angular-validators/node_modules/semantic-release/index.js:191:5)
at async module.exports (/builds/myProject/angular-validators/node_modules/semantic-release/index.js:260:22)
at async module.exports (/builds/myProject/angular-validators/node_modules/semantic-release/cli.js:55:5) {
shortMessage: 'Command failed with exit code 128: git tag v1.0.0 2c30602010d7d9f26cc0880b988ff9de6405daa5',
command: 'git tag v1.0.0 2c30602010d7d9f26cc0880b988ff9de6405daa5',
But when I check out my project on GitLab,
https://gitlab/myGroup/myProject/-/tags
It shows no tags. When I view my pipline's output, I see
Getting source from Git repository
Fetching changes with git depth set to 50...
Reinitialized existing Git repository in /builds/myGroup/myProject/.git/
Checking out fc225500 as master...
Removing .npm/
Removing node_modules/
Skipping Git submodules setup
You need to change your "Git Strategy", to clone. There is no way to get past this error or clear the cache without doing this.
Find the instructions on the GitLab documentation for choosing a Git strategy. There are two methods they support detailed above,
You can specify this in the project settings (instructions on the doc page above)
or by specifying a GIT_STRATEGY variable in the .gitlab-ci.yml file.

gitlab: git-http-push failed, return code 22

First of all my gitlab connection was broken by error 500 and 502. The server was unattended for a while. So i decided to reinstall:
#gitlab-ctl cleanse
#apt-get purge gitlab-ce
Installation:
https://about.gitlab.com/downloads/#ubuntu1404
After the gitlab was reachable and i could create a project and clone it.
After i tried to push a new file to my repo and got following message:
git add .
git commit -m "inital"
git push --set-upstream origin master
error: Cannot access URL http://<username>#gitlab.domain.de:<port>/group/project.git/, return code 22
fatal: git-http-push failed
error: failed to push some refs to 'http://<username>#gitlab.domain.de:<port>/group/project.git/'
The gitlab-check gives this information:
#gitlab-rake gitlab:check
everything was green, besides violett ones:
Uploads directory setup correctly? ... skipped (no tmp uploads folder yet)
Init script exists? ... skipped (omnibus-gitlab has no init script)
Init script up-to-date? ... skipped (omnibus-gitlab has no init script)
Why i can clone but not push? I searched in several log-files, but got nothing useful.

gitlab 8.2.0 git not working

I installed gitlab 8.2.0 from source and followed the instructions on https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.
When I run the checks with
sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
I get the following error:
Running /home/git/gitlab-shell/bin/check
Check GitLab API access: FAILED. code: 301
gitlab-shell self-check failed
Try fixing it:
Make sure GitLab is running;
Check the gitlab-shell configuration file:
sudo -u git -H editor /home/git/gitlab-shell/config.yml
Please fix the error above and rerun the checks.
Checking GitLab Shell ... Finished
Here is my config.yml file from /home/git/gitlab-shell:
user: git
gitlab_url: "http://www.example.com/gitlab"
http_settings:
#ca_path: /etc/ssl/certs
self_signed_cert: true
repos_path: "/home/git/repositories/"
auth_file: "/home/git/.ssh/authorized_keys"
redis:
bin: "/usr/bin/redis-cli"
namespace: resque:gitlab
socket: "/var/run/redis/redis.sock"
log_level: INFO
audit_usernames: false
Note that I am using the relative URL feature to run gitlab on www.example.com/gitlab. Also the server is behind a reverse proxy that terminates https to http if this should be of any relevance for this problem.
I also cant' push or pull any repositories. When I try to I get the following error:
git pull https://www.example.com/gitlab/test/testproject.git
Username for 'https://www.example.com': test
Password for 'https://test#www.example.com':
fatal: Couldn't find remote ref HEAD
Unexpected end of command stream
I also can't add any files to any project via the webUI. If I try to do so I get the following error
Commit was rejected by pre-receive hook
The log for this from production.log looks as follows:
Sarted POST "/gitlab/test/testprojekt/create/master" for 147.86.8.115 at 2015-11-26 15:24:43 +0100
Processing by Projects::BlobController#create as JSON
Parameters: {"new_branch"=>"master", "create_merge_request"=>"1", "commit_message"=>"test", "file"=># <ActionDispatch::Http::UploadedFile:0x007f776230faf8 #tempfile=# <Tempfile:/tmp/RackMultipart20151126-7584-308za1>, #original_filename="test2.txt", #content_type="text/plain", #headers="Content- Disposition: form-data; name=\"file\"; filename=\"test2.txt\"\r\nContent-Type: text/plain\r\n">, "namespace_id"=>"test", "project_id"=>"testprojekt", "id"=>"master"}
Completed 200 OK in 628ms (Views: 0.3ms | ActiveRecord: 3.3ms)
Started GET "/gitlab/test/testprojekt/new/master" for 147.86.8.115 at 2015-11-26 15:24:44 +0100
Processing by Projects::BlobController#new as HTML
Parameters: {"namespace_id"=>"test", "project_id"=>"testprojekt", "id"=>"master"}
Completed 200 OK in 85ms (Views: 49.6ms | ActiveRecord: 6.0ms)
I think you could try switching gitlab_url: "http://www.example.com/gitlab" to https -> gitlab_url: "https://www.example.com/gitlab"
Not sure if its a complete fix but its a recomendations.
EDIT:
config.yml line 4 should look like
ca_path: "/etc/ssl/certs"

Resources