RStudio gitlab: push not working with personal access token - gitlab

I am working in RStudio and I cloned a project lately (using my personal access token, with read_repository and write_repository permissions).
When I want to push my changes to the gitlab repository, I get an error:
remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'read_repository' or 'write_repository' scope for Git over HTTP.
remote: You can generate one at https://test.com/-/profile/personal_access_tokens
fatal: Authentication failed for 'https://test.com/test/test.git/'
Why is the private token not woking anymore? I did not change anything.

Related

Gitlab clone project: authentication failed

I tried to simply clone a Gitlab project jusing both HTTPS and SSH and they both don't work and print back an atuhentication failed message.
When trying with https address:
git clone https://gitlab.com/project.aa/project.git
Cloning into 'frontend'...
remote: HTTP Basic: Access denied
fatal: Authentication failed for 'https://gitlab.com/project.aa/project.git'
And with my SSH key that's the message I get:
Cloning into 'frontend'...
git#gitlab.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
What can I do?
Try log-out and login with the same credentials that you're trying to use for cloning the repository. If the problem persists: In Windows, Search for Credential Manager. In that choose Windows manager. Select your Gitlab credentials and modify it.

I cannot pull with source tree in github

I am trying to pull in gitlab with source tree but unable to do so.
git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
remote: HTTP Basic: Access denied fatal: Authentication failed for
'http://davy_yg#git.amanahcorp.com/daffi_gusti/soulfy_repo3.git/'
remote: Forbidden fatal: unable to access
'http://davy_yg#git.amanahcorp.com/daffi_gusti/soulfy_repo3.git/': The
requested URL returned error: 403 Completed with errors, see above.
How to fix the error so that I can pull and push?
See issue 6576 as a way to troubleshoot this issue.
For instance, you can:
try and see if cloning through ssh work
look for the production.log for a more precise error
check the project visibility to compare against the user permissions (a public project for instance should require no authentication)

gitlab cannot pull or clone project

I got this message error when do this command git clone https://project.gitlab.cct/user/testproject.git Initialized empty Git repository in /root/testproject/.git/ error: The requested URL returned error: 401 Unauthorized while accessing https://project.gitlab.cct/user/testproject.git/info/refs
fatal: HTTP request failed
This project is set private and although I were granted permission to access this project (joined), someone help me to turn off authorization for private project or appear a password prompt to access
Thank you!

http 401.1 error while performing a GIT clone from a Linux server

I'm running TFS 2013 with a GIT team project. When I perform a git clonefrom one of the local Windows servers I don't have any issues:
-bash-4.1$ git clone "http://tfsadm:tfspas#tfs.server.com:8080/tfs/DefaultCollection/_git/Main"
Initialized empty Git repository in /home/tfsadm/Mainframe/.git/
but when I perform a git clone from Linux, I get the following error:
error: The requested URL returned error: 401 while accessing http://tfsadm:tfspas#tfs.server.com:8080/tfs/DefaultCollection/_git/Mainframe/info/refs fatal: HTTP request failed
Error: The requested URL returned error: 401 while accessing https://github.com/Joey-myproject/repo.git/info/refs fatal: HTTP request failed
is an often reoccuring error.
One of the reasons of this happening is because the client is not authorized to access to that resource.
A general solution is to check for the following:
Do you have a stable git version?
Is the remote correct configured?
If 2FA is enabled, if so provide an access token.
Double check your permissions(username/password in configs) perhaps also try to use the format ' https://username#mydomain.org/project.git''
Try ssh instead of https
I am not sure, but have you already seen this link Can't clone a github repo on Linux via HTTPS?
It can give some extra information.

git-svn rejected Basic challenge now that VPN is required

I have been using git-svn for a few months now as an interface to the SVN repository for my company.
However, about a week ago my company changed their policy such that SVN is only reachable if connected by way of Cisco VPN.
I have no trouble connecting to VPN on my Linux Mint VM (which is where I do my coding), but I am now no longer able to pass authentication when I, for example, run git svn dcommit to checkin code changes.
I have tried:
rm -rf ~/.subversion, to get rid of any saved SVN authentication credentials and force it to take new ones, but this seems to have no effect, nor does it ever prompt me for fresh credentials, surprisingly.
starting in a freshly created directory and running git svn clone to initiate a new link to the SVN repository, but with the same authentication failures.
Here is what I see when running git svn dcommit or git svn clone:
$ git svn dcommit
Committing to https://<redacted>:2443/svn/LS/branches/PRODUCTION-SUPPORT-1/ls-policygen ...
WARNING: gnome-keyring:: couldn't connect to: /tmp/keyring-wCQwzG/pkcs11: No such file or directory
Authorization failed: OPTIONS of 'https://<redacted>:2443/svn/LS/branches/PRODUCTION-SUPPORT-1/ls-policygen': authorization failed: Could not authenticate to server: ignored NTLM challenge, rejected Basic challenge (https://<redacted>:2443) at /usr/local/libexec/git-core/git-svn line 943
The gnome-keyring warning has always been present, and never stopped commits before VPN was required.
take a look at this snipped from your error code:
Authorization failed: OPTIONS of 'https://<redacted>:2443/svn/LS/branches/PRODUCTION-SUPPORT-1/ls-policygen': authorization failed: Could not authenticate to server: ignored NTLM challenge, rejected Basic challenge (https://<redacted>:2443) at /usr/local/libexec/git-core/git-svn line 943
specially at this part: Could not authenticate to server: ignored NTLM challenge
It looks like your company also changed autentication methods too.
Take a look at: Does git clone work through NTLM proxies?
I would take this steps:
connect to your repository within your browser
try to connect with another user account - probably you have some cache files in your home directory
configure git or even svn according to NTLM auth
Good Luck,
LEslie

Resources