Jason
Jason

Reputation: 7682

Gitlab project clone error 500; no .git; unable to access

On Gitlab CE, I cloned an outside repository over https using the UI. The clone ended in a 500 error, and now I am unable to access the project (500 error) when logged in. I can view the project page when not logged in.

I am unable to access from the command line, as there is no .git file associated with the project.

How to resolve, restore, or remove the project?

Upvotes: 0

Views: 1987

Answers (1)

I had this same problem with git on linux.

I have decided as follows.

Everything that is configured in Root is in Root and can only be accessed by Root.

Everything that is configured by the user stays in the user and the user can access.

My problem was that I created the con gurations of git with the root user, also ssh was done in root, this resulted in an access error.

As I solved, I created 2 ssh, 1 in Root, and 1 in the User, both configured in gitlab or github for access.

Other relevant information, all folders made by the user he has access permission, and all the folders created by the root user is not allowed access, I will explain later.

INFORMATION: BY CONFIGURING BY THE ROOT YOU WILL NOT HAVE ACCESS PERMISSION.

EXAMPLE: BY GIVING THE COMMAND.

sudo mkdir Repository 

By Using the git init command by the user will give access permission error.

git init

how to solve.

MAKE YOUR GIT CONFIGURATION AGAIN.

START CREATING A NEW SSH BY THE USER AND NOT BY THE ROOT.

ssh-keygen -o -t rsa -b 4096 -C "<your e-mail>"

IT WILL ASK IF THE FILE NAME AND LOCATION WILL BE THE STANDARD.

PRESS ENTER TO LEAVE PATTERN. PLACE A PASSWORD FOR YOUR SSH. CONFIRM YOUR PASSWORD.

NOW COPY YOUR SSH. OR INSTALL XCLIP TO COPY YOUR SSH.

sudo apt install xclip

COMMAND TO COPY YOUR SSH

xclip -sel clip /[USERNAME]/.ssh/Id_rsa.pub

BETWEEN YOUR GITLAB, OPEN YOUR PROFILE, BETWEEN SETTINGS, GO TO THE SSH KEY AND PLACE WHAT HAS BEEN COPIED IN THE TEXT FIELD.

CHECK ON YOUR TITLE IF YOUR EMAIL APPEARED

TO THE END CLICK TO ADD KEY

RETURN TO YOUR PROMPT.

CONFIGURE YOUR USER OR YOUR FILE .GITCONFIG

git config --global user.name "[YOUR GIT USERNAME]"
git config --global user.email "[YOUR GIT E-MAIL]"

READY. I HOPE THAT THE GIT HAVE PERMISSION NOW. TO CLONING OR VERCIONALIZING.

HOPE THIS HELPS.

Upvotes: 1

Related Questions