Gitlab Remote Repository (locally-hosted) - installation

I'm new to Git and Gitlab. I downloaded and installed Gitlab to my PC so I could have a private Git repository. I would like like to ask a few things regarding git-data in my private Gitlab setup (local only).
I was able to find my project name in the gitlab repository. It has some files/folders inside but I couldn't find the source code I pushed. I could see HEAD, INFO, etc. I was expecting to find my project folder which I pushed to this remote repository containing my source codes. Am I wrong to expect a copy of my project folder here with the source codes? Or is my pushed source code being stored in a compiled manner hence I couldn't find it?
Security-wise, can I assume that Gitlab doesn't send or push any of my code elsewhere in the Internet?

Related

Copy contents of different branches in github repository to local folder with branch names as folder names

I have a github repository I wish to copy to my local folder.
This github repository has multiple branches- main, 01_01, 01_02, 02_01, etc...
I wish to download the current contents of each branch in my local machine.
The download happens such that branch main gets downloaded to folder main, branch 01_01 gets downloaded to folder 01_01 and so on.
I'm aware that a git clone copies all branches but then I will have to checkout and see the contents which I do not wish to do.
I would sincerely appreciate if someone one could guide me as to how to do this - may be a bash or powershell script .
Thanks

I cut/pasted a folder into a local repository mid-clone - the clone failed and the folder disappeared. Is the folder I pasted gone forever?

I wanted to put my local code into a GitHub repository.
I created a repo on GitHub and tried cloning with HTTPS.
The clone was taking a moment but the folder was created on my laptop so I decided to cut/paste my local code into the local repo folder.
Well, the clone ended up failing and the repo folder just disappeared, along with all of its contents.
The folder I added to the local repo also disappeared.
I can't even find it in the recycling bin. Is it gone forever?
Next time:
make sure you have installed gh, the GitHub CLI
create a repository locally where your code is
publish to GitHub (that will create the remote repository)
That way, no clone, no hazardous code migration.
The command to create the remote repository is (after a gh auth login):
gh repo create.
Inside a git repository, and with no arguments, gh will automatically create a repository on GitHub on your account for your current directory, using the directory name.

Artifactory GO remote not downloading zips

I'm using Artifactory 7.10.6.
go version 1.15.6 (also tested with older versions)
I am not using the jfrog cli, and would prefer not to.
I'm trying to sort out what I'm doing wrong here. I've used Artifactory to pull down content from remote connections to be stored on an local repository for other package types, but this doesn't seem to be working for me fully with GO. Disclaimer, I'm not super versed in GO...
Here is what I have setup.
a local go repo called "go-ext-release"
a remote of gocenter called "go-gocenter"
a virtual called "go-virtual" that contains only "go-ext-release"
a virtual called "go-virtual-dev" that contains "go-virtual" followed by "go-gocenter"
The idea here of course. Run a build with my GOPROXY set to "go-virtual-dev", copy the downloaded files from go-gocenter-cache to "go-ext-release". That should get me all the files I need to reset my environment, point to GOPROXY to "go-virtual" and run a build.
My build pointing to "go-virtual-dev" works fine. Build works, content is pulled down (mostly .mod and .info).
I move that content to the local (go-ext-release) and build in a clean environment using "go-virtual" and the build fails. it says it can't access .zip files. i.e. a 404 on /github.com/gorilla/mux/#v/v1.7.4.zip
Of course when I look for that zip, it doesn't exist.
If I take the url its trying to access and change the url from the "go-virtual" path to "go-virutal-dev" and punch it into a web browser the correct zip file gets downloaded to the "go-gocenter-cache" repo (as expected).
I did this process for the 4 or 5 zip files the build needed (its a small test build), and then moved the zips from the cached location over to the "go-ext-release" repo. After that, the build works using the "go-virtual" repository (i.e. the repo that just sees into our local repo).
So what am I doing wrong here? My expectation was that the initial build would have pulled all the files , zips included, to the cache as well. I know the build pulled them down because I can see them in my GOCACHE folder. Its as though it isn't using my GOPROXY to pull the zips down
Any help would be appreciated.
is there any commanline switch to force go to show me the exact URL it is using for pulls? I've experimented with using go get -v, but it doesn't give the full url.
Can you try running the build against go-virtual-dev using an empty GOPATH. I believe the Go client will not trigger the module zip download if you already have it locally which will not allow Artifactory to cache it from the remote repo.
BTW, Running go get -x should show you all the URLs being fetched.

Extra directories and files added to git repository

I had always used Git locally on Mac OSX and decided to try out Github and Bitbucket. I had some issues getting it working and tried a few fixes that others suggested who had similar problems. I was able to push to Github and Bitbucket, but I also managed to somehow add extra directories and files to my repository in the process.
I'm using Xampp to develop locally, and I have a folder in there that I created my repository with, so the file structure is something like this
Applications
XAMPP
xamppfiles
htdocs
myproject -this is was originally the repository that I had been using
randomdirectory1
randomdirectory2
randomdirectory3
randomfile1
randomfile2
One thing to note. Not every single directory and file in htdocs was added to my repository. There were only 3 added, and about 7 other folders.
Prior to trying out github my repository just consisted of myproject located in /Applications/XAMPP/xamppfiles/htdocs/myproject. Now, there are a bunch of other directories and files added to it. I know this, because in conjunction with the command line I also used GitX for a visual reference. Now, all of these extra files and directories are showing up.
Maybe I don't fully understand how git repositories works. Prior to this, I had only used add, commit and checkout commands. All I know is that my repository appears to be different in GitX and matches on Bitbucket/Github.
What folder did you initialize the Git repo from? It sounds like you meant to init from the myproject folder, but instead you did it from the Applications folder.
Does GitHub show all those extra directories?
Where is the hidden .git folder?
Is this a private repo just for you, or just for you and a few known others? Are you willing to rewrite history?

Why won’t Jenkins running on my Mac connect to a local git repo?

I am trying to implement automated builds using Jenkins for my iOS projects. I added the Git plugin, but as soon as I try to put the URL for git in the git configuration for the project, it is showing the error in the screen shot below. Here Jenkins cannot clone from the repo to its workspace.
For the "Repository URL" field it is expecting a remote repository URL, something like git#github.com:github/hubot.git. It will use that url to copy down code to run the job against.
If you just want to run a job in a particular directory where you already have the code you want to work against, then leave this section empty. You can set the directory that you want to run a job in by
1. scroll to the "Advanced Project Options" section
2. click "Advanced"
3. Check "Use custom workspace"
For one off things, this is fine, but if you use this a lot, I think you'll find it more useful to commit your code to github and have jenkins clone down a fresh copy of code for each run.
You will get that error if you miss the following cases:
Whenever the clone URL is wrong.
When you are trying to clone from a place where you don't have the
access to git server.
Whenever your Pem key is not added to the list of keys on the git
server.
In most cases git bare repo has extension .git
I mean (other)/test1 dont look correct, i think it should be (other)/test1.git had this same error on my mac.
Actually i solved the issue . it was because of the permission the remote git is not updating properly

Resources