How to add a ssh key to gitolite server without using gitolite-admin? [closed] - gitolite

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I want to add a ssh key to my gitolite server from a new workstation.
I can't do it through gitosis-admin, because I can't clone it, and I don't have access to my previous laptop containning the ssh-key with which I installed gitolite.
How can I add my new key to gitosis-admin/keydir without cloning gitosis-admin?
Thanks

The "Don't panic" page can help (for gitolite V3, not the old obsolete gitosis):
lost admin key/access
If you lost your gitolite admin key or access, here's what you do. We'll assume your username is 'alice'.
Make yourself a new keypair and copy the public key to the server as 'alice.pub'.
Log on to the server, and run gitolite setup -pk alice.pub.
That's it; the new alice.pub file replaces whatever existed in the repo before.
That would allow you to add keys using a clone of gitolite-admin repo, as you should.
That won't "reset" your gitolite.conf file, or anything in your gitolite-admin repo: it will complete the ~/.ssh/authorized_keys file.
It certainly have no effect on your existing repositories.
That being said, if a gitolite command seems too risky, you can try the second approach:
bypassing gitolite
You may have lost access because of a conf file error, in which case the above trick won't help. What you want is to make changes to the repo (or perhaps just rewind) and push that. Here's how to do that:
Log on to the server.
Clone the admin repo using the full path: git clone $HOME/repositories/gitolite-admin.git temp.
Make whatever changes you want -- add/replace a key, 'git revert' or 'git reset --hard' to an older commit, etc. Anything you need to fix the problem, really.
Run gitolite push (or possibly gitolite push -f). Note that's 'gitolite push', not 'git push'.
NOTE: gitolite does no access checking when you do this!

Related

Log files with same content after build [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 5 years ago.
Improve this question
I performed Poky build fetching the latest master branch from git
git clone -b rocko git://git.yoctoproject.org/poky.git
Set up the Environment using the following command
source poky/oe-init-build-env
Then executed bitbake command
bitbake core-image-full-cmdline
Bitbake did generate root file system, kernel image .. I was looking at the log files of the bitbake in build/tmp/log/cooker/qemux86 folder
There are two files with the same content:
- console-latest.log
- 20171224045428.log
Why we have two logs of the same content
console-latest.log is a symlink that points to the latest real console file 20171224045428.log. It allows to keep previous console logs and have an easy single way to access the latest console log.
In Yocto, a lot of log files work this way, see manual log section.

Git post-receive hook stopped copying files to web directory [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 years ago.
Improve this question
Disclaimer: I'm a git newbie.
I followed the following post: Setting up your git repos the normal way (here on stackoverflow) to get a --bare repo set up at /home/www-data/themename.git and a post-receive hook working that copied everything to my /var/www/domain.com/htdocs/wp-content/themes/themename/ folder. (I followed the instructions on that post exactly). Everything was working perfectly.
However, today I wanted to take a look inside that post-receive hook and ran cat /home/www-data/themename.git/hooks/post-receive. If you didn't notice, I accidentally placed two spaces after cat instead of one. Which overwrote everything in the file rather than displaying it. Looking back, I should have just used nano. So I opened the post again, and copied the code snipped from the post and pasted it into my post-receive hook again. But now it doesn't do anything. The files aren't copied.
Thinking that maybe it was a permissions issue, I ran chown -R www-data:www-data on /var/www and that didn't work. I also ran chown -R www-data:www-data on /home/www-data and that also didn't work. Lastly I ran chmod +x /home/www-data/themename.git/hooks/post-receive to make the file executable in case it stopped being, and that also doesn't work.
Also, git pull still works correctly in the /var/www/domain.com/htdocs/wp-content/themes/themename/ directory.
Any suggestions to fix this? Or should I just create the repos and directories from scratch again?
This started working again after the server was rebooted.

Push my project to GitLab [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.
Want to improve this question? Update the question so it focuses on one problem only by editing this post.
Closed 3 years ago.
Improve this question
I'm using Git for the first time, some one can help me, I have user name, password and project repository, and I would push my project to Gitlabto this repository using windows 7.
Thanks
If you have an empty Git repo declared (see Create Project), you can go to your local project and:
cd /path/to/my/local/project:
git init .
git add -A .
git commit -m "First commit"
git remote add origin https://<myLogin>#<mygitlab>/<mylogin>/<myproject>
git push -u -f origin master
#The -f flag stands for force. This will automatically overwrite everything in the remote directory. We're only using it here to overwrite the README that GitHub automatically initialized.
Note: to get Git, simply uncompress PortableGit-2.4.5.1-4th-release-candidate-64-bit.7z.exe anywhere you want and add C:\path\to\PortableGit-2.4.5.1-4th-release-candidate-64-bit\cmd to your %PATH%.

Replace the contents of a github repository with the contents of a folder [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 4 years ago.
Improve this question
I'm trying to replace the contents of a github repository with the contents of a folder. I've tried git push, but it doesn't seem to do anything unless I add each of the files individually using the command line. Is there any command that I can use to replace the contents of the repository with the folder's contents?
My repository is here: https://github.com/jarble/downloadedModules
git add adds your modified files to the queue to be committed later
The following are the steps to add a file and push to the repository:
git add <file/folder>
git commit -m "Checkin in code"
git push -u origin master
For detailed explanation refer to this answer

Linux console: git command not found on x64 Cent OS [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I have a completely fresh install of 64 Bit Cent OS 5.7, this is in VirtualBox on top of 64-bit XP.
I'm trying to install SSU.
Problem: The command 'git' was not found. See "code" below please.
Have tried looking this up: /usr/local/git/ does not exist: git: command not found (on OS X 10.5)
I don't care about source code: I just want git to work so SSU will install so I can try to access the bank on what seems like a huge whim.
I am signed in to Gnome as root and seem to be able to access my computer normally without being harassed about passwords excessively and can create or edit files.
[root#localhost ~]# $ git clone https://github.com/wesabe/ssu
bash: $: command not found
Concerns
Unfortunately every single time I ask these kinds of questions and don't make clarifications I end up having to make those clarifications. So...
No negativity or rudeness intended what-so-ever: if the answer involves editing a text file or copy-and-paste actions please tell me the locations to do so in the file manager instead of console commands. I'm perfectly okay copying and pasting console commands for things that really should be done in the console though.
Note: there appear to be numerous "git" commands and numerous "ssu" commands. I do NOT know the difference between them and would really prefer someone who has solid expertise to answer so that I nor others end up accidentally trashing our copies of Linux as it's been very difficult to get anything to work and stay working thus extending my personal stay with XP.
I will be more than happy to both accept an answer and thumbs it up should it be helpful.
I would first try installing git. As root:
yum install git
According to here,
yum install git-core
If that doesn't work you could add the EPEL source. There are also RPMs for git.

Resources