Hot answers tagged

28

The fatal error message indicates you’re working from somewhere that’s not a clone of your git repository. So let’s start by cloning the git repository first: git clone https://github.com/benqzq/ulcwe.git Then enter it: cd ulcwe and rename the directory: git mv local xyz For the change to be shareable, you need to commit it: git commit -m "Rename ...


25

When you use the IdentityFile option in your ~/.ssh/config you point to the private, not the public, key. From man ssh_config: IdentityFile Specifies a file from which the user's DSA, ECDSA or DSA authentication identity is read. The default is ~/.ssh/identity for protocol version 1, and ~/.ssh/id_dsa, ~/.ssh/id_ecdsa and ~/.ssh/id_rsa ...


19

You can do it all from your existing repository (no need to clone the fork into a new (local) repository, create your branch, copy your commits/changes, etc.). Get your commits ready to be published. Refine any existing local commits (e.g. with git commit --amend and/or git rebase --interactive). Commit any of your uncommitted changes that you want to ...


16

Like the error message tells you, git clone expects a git repository. You can't "add" the name of a branch in the path like that. See branches in git. You can clone a single branch (and it's history) : git clone <url> --branch <branch> --single-branch See git help clone. But the clone command you ran gave you a copy of the whole repository, ...


13

Auth with username and password is supported by github api: There are three ways to authenticate through GitHub API v3. ... Basic Authentication $ curl -u "username" https://api.github.com ... So just choose a lib in the language you prefer and use the implemented version of the Create a Public Key "Public Key" API Section: Creates a ...


12

This command should work: $ git fetch origin [branch] The above command only fetches metadata from remote repository, it not does merge sources. If you want to fetch and merge the sources, the command would be: $ git pull origin [branch] Be careful with the branch where you are executing merge command. It will be where the sources are merged.


10

You can use the curl command to download it: curl -LO https://github.com/downloads/SpiderLabs/ModSecurity/modsecurity-apache_2.7.1.tar.gz


7

Similar to xx4h's answer, this is how I do it in scripts for automating new VM setups. ssh-keygen -t rsa -b 4096 -C "myemailaddress@hotmail.com" curl -u "myusername" \ --data "{\"title\":\"DevVm_`date +%Y%m%d%H%M%S`\",\"key\":\"`cat ~/.ssh/id_rsa.pub`\"}" \ https://api.github.com/user/keys It gives you a new SSH key, includes it in the curl call ...


7

Server side has disabled the SSLv3 encryption handshake, because of SSLv3 severe security issues. Moreover, your wget client is an outdated version and still use as default this SSLv3 encryption. You have 2 options: use --secure-protocol=TLSv1 flag in front of wget. wget --secure-protocol=TLSv1 install an updated version of wget that use as default TLSv1 ...


6

You can use github's svn support: svn export https://github.com/user/project/trunk More details here: https://stackoverflow.com/questions/9609835/git-export-from-github-remote-repository


5

The general problem is that github typically serves up an html page that includes the file specified along with context and operations you can perform on it, not the raw file specified. Tools like wget and curl will just save what they're given by the web server, so you need to find a way to ask the web server, github, to send you a raw file rather than an ...


5

No, there is no way to do this as a direct operation because of the way git is structured. The way that git works is that it stores a copy of the entire repository, including all history, to every single location. Github, or Bitbucket, or any other hosting provider is essentially just another copy of your git repository, with a pretty web interface on ...


4

git repositories contain all branches (but compressed and only differences hence rarely a size issue). Therefore, you can clone the entire project as you have done successfully. This is a standard way to get a repository, even if you are only interest in one branch. The .git structure will then include all the branches done on that repository. To use a ...


4

I would simply run the git clone as you've described and then delete the .git directories that are dispersed throughout the cloned directory. $ find puppet-heat/ -name '.git' -exec rm -fr {} +


4

If you just want to compute the checksum of the file you downloaded you should leave the -c out. Apologies if I didn't understand your question right. For example: $ md5sum git-manpages-1.8.4.tar.gz e3720f56e18a5ab8ee1871ac9c72ca7c git-manpages-1.8.4.tar.gz md5sum also expects 2 spaces between checksum and file name in files to be used with -c, just like ...


4

The problem is you are trying to update from github which requires an ssh key. Either create a dedicated ssh key without a password on your server and add it to your github account or use the http-readonly uri to update your repository: git pull --mirror https://github.com/account/repository.git


4

You should check your wget version. I had the same problem with older versions of wget (< 1.15).


4

The cat command results must be expanded using command substitution. The syntax for bash is: curl -u "user:pass" --data '{"title":"test-key","key":"'"$(cat ~/.ssh/id_rsa.pub)"'"}' https://api.github.com/user/keys You can also use a classic backtick notation: curl -u "user:pass" --data '{"title":"test-key","key":"'`cat ~/.ssh/id_rsa.pub`'"}' https://api....


4

The usual way to force adding an empty directory in systems that ignores empty directories is to add a hidden file in each such directory: $ touch directoryname/.empty_dir $ git add directoryname/.empty_dir $ git push With git, you may choose to use .gitignore in place of .empty_dir above (really, any name will do, and the only reason to use a hidden ...


4

I would suggest taking a look at fpm - effing package manager is the name or the docs here. You can use fpm to convert anything to a package, such as RPM, DEB, etc. Pretty solid tutorial here - How To Use FPM To Easily Create Packages in Multiple Formats. Using fpm you can take builds of your software and generate .deb or .rpm files like this: $ cd ...


3

I am not a lawyer, but I think the answer is yes. From GNU GENERAL PUBLIC LICENSE Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that ...


3

All of them rely on ssh to authenticate the user, then something else for authorization. Gitosis and Gitolite both use a config file; Gitorious uses (I think) a database (although, it may be generating a config file anytime project permissions change; not sure).


3

I have no idea what the best approach is and elegance is certainly in the eye of the beholder, but I use the following for my dotfiles: A ~/.dotfiles directory that contains all of the dotfiles themselves. These are all managed in a git repo. A script, also in ~/.dotfiles that creates the required links into my home directory. I don't have any dotfiles in ...


3

You need to specify the bash shell in the shebang for this to work: #!/bin/bash When bash runs a script without a shebang or with #!/bin/sh it runs in POSIX mode which has some limitations. You also need to enable the extglob shell option in bash to make it understand the !(...) globbing pattern: shopt -s extglob


3

git itself provides a GUI, which in Debian derivatives, including Raspbian, is packaged as git-gui. Install that, and you’ll be able to run git gui to perform most operations. You can also install gitk to explore repositories in a GUI. To resolve merge conflicts, I quite like Meld, but that pulls in part of GNOME so it doesn’t quite count as lightweight!


3

Because the 'executability' of a file is a property of the file entry on UNIX systems, not of the file type like it is on Windows. In short, ls will list a file as being executable if any of the owner, group, or everyone has execute permissions for the file. It doesn't care what the file type is, just what the permissions are. This behavior gives two ...


3

You can use the shell’s parameter expansion features to extract the number: url=https://github.com/org/repo/pull/777 echo "${url##*/}" This will also work with positional parameters: set https://github.com/org/repo/pull/777 echo "${1##*/}"


2

I was able to figure out what the problem was; I found, that the github repo is actually on 207.97.227.239, therefor my subnetmask was wrong. Changed the routing rule to 207.97.227.0/24, and the traffic started routing, but still failed. I additionally had the problem, that my lease of the dhcp on my wireless was outdated and the gateway had changed.. so a "...


2

We had this problem, and it was a cut-and-paste error. A single % symbol had been added to the end of the key file (so the last line was -----END RSA PRIVATE KEY-----% ). There was no error or debug info or anything else to suggest that the key was the wrong length or badly formatted, but ssh asked for a passphrase.


Only top voted, non community-wiki answers of a minimum length are eligible