VPN, SSH, GitLab and composer update - ssh

When I try to update composer in project, I have a problem:
I work with VPN connection, and I haven't any access rights to work with gitLab on SSH. But I can work with project with usual https.
But composer updating try to use SSL and there is error:
Failed to execute git clone --mirror 'git#gitlab.***.net:***.git' '***.git/'
Permission denied (publickey).
I want to change updating wrom SSH to usual https.
How I can do it?

So you can use
git clone https://gitlab.***.net:***.git' '***.git
and then authenticate yourself - your gitlab repository should have both git and https repository urls if you need to verify

Related

Why Can't I push to gitlab repository?

I recently created a new gitlab repository, and have set up a repository deployment key with the ssh public key from my computer. I manage to clone the project with ssh, but when I try to push changes into the repository, I get returned with a fatal error:
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
In order to be able to push all the following should be implemented first
Make sure the project has been created under your username on
GitLab.com.
your Git username and email match your GitLab.com account for this
repository
the remote origin was set:
git remote add origin git#gitlab.com:user_name/work.git
an SSH public key was added to your GitLab.com account (if cloning
over using git or ssh).
ssh -T git#gitlab.com
Otherwise you could create a specific access token for the project you want to write to
The following guide could be useful https://blog.programster.org/gitlab-create-a-projects-access-token

fatal Error when Pushing to remote Repository

i have tried all means to add this remote repository but i cant pull
or push when i push a git-hub repository it works what am i missing
e.gatoto#EMMANUEL MINGW64 ~/Desktop/myrepo.git (master) $ git push
origin master e.gatoto#192.168.180.27's password: fatal:
''~/Desktop/myrepo.git'' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the
repository exists.
e.gatoto#EMMANUEL MINGW64 ~/Desktop/myrepo.git (master)
List item
If you have double authentication on github you will have to create a key when pushing from remote to get access to the repository.
You will then use the key password instead of the password to your github account.
Maybe its related?
2FA give problems when pushing to GitHub

How to configure Bitbucket app password with SourceTree?

I enabled two-factor authentication in Bitbucket, then created an app password. Where should I configure this app password in SourceTree?
Please follow the below steps suggested by Atlassian -
Source: https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/
For anyone finding this in 2021, another alternative (If you've been using other Bitbucket repositories all the while without having this problem). My issue is that I still had a very old repo still using the HTTPS git URL.
For example, issuing git remote -v in my legacy repository revealed something like:
origin https://myusername#bitbucket.org/myusername/myrepository.git (fetch)
origin https://myusername#bitbucket.org/myusername/myrepository.git (push)
Simply take the SSH version of your repository instead and set it with (using above url as an example):
git remote set-url origin git#bitbucket.org:myusername/myusername.git
You can do a sanity check by issuing git remote -v again to confirm that the new origin URL has been set.
Once this is set, you should be able to push to your remove without issues.
Simply use your app password instead of your account password when you configure the repository.

Unable to clone a shared repository via ssh (mercurial)

I am having an issue with mercurial. I have ssh keys set up between my machine and the bitbucket account I am cloning with and I am able to clone any repo that I have created. However I am trying to clone a friends repo and she has given me read access, however when I try to clone via ssh I get the following error:
"remote: conq: repository access denied.
abort: no suitable response from remote hg!"
I am able to clone this repo via https and I am totally lost. It seems like an ssh issue but I am lost.
If none of the ssh troubleshooting BitBucket tips works, make sure you are not using sudo when trying to clone (as in "SSH to bitbucket returing Permission Denied (publickey)")
The key is to make sure your $HOME/.ssh/id_rsa(.pub) ssh files are used by the git clone command, and that your public key is in your account (which it should, since you can clone your own repos with ssh).

Gitlab-CI with Gitlab setup, self-hosted

I have setup Gitlab in ubuntu server, it's working fine. I access Gitlab by url http://123.456.789.100 and Gitlab login details
username:admin#local.host
password:123456
Then I wanted to set Gitlab CI for test the code before it merge. I have done with setting Gitlab CI by using the link. I have done setting up every thing except Runners. While set ssh git#<your gitlab url> in Runner I face error
ssh git#123.456.789.100
it prompts me for password
git#123.456.789.100's password:
I entered password(123456) of gitlab's that I used to enter into gitlab server, then I have this error
Permission denied please try again
But I got Gitlab CI web interface by http://123.456.789.100:8081(I did set Gitlab-ci to listen on 8081 port). Then I entered Gitlab server's username and password as admin#local.host and 123456, I got Invalid credentials.
What would be the wrong I made?
When you put git# in the ssh it’s actually trying to use the git user on the machine that is running GitLab (rather than some GitLab controlled user).
The easiest fix for this would be to create an SSH key on the runner in question and then add that SSH key to GitLab. That will allow the runner to access the GitLab instance and clone and repositories you need.
For more help getting started, see this page on Configuring GitLab runners.