Git Product home page Git Product logo

ghorg's Introduction

ghorg

Go Report Card GoDoc Mentioned in Awesome Go License WakeMeOps

Pronounced [gore-guh]; similar to gorge. You can use ghorg to gorge on orgs.

Use ghorg to quickly clone all of an orgs, or users repos into a single directory. This can be useful in many situations including

  1. Searching an orgs/users codebase with ack, silver searcher, grep etc..
  2. Bash scripting
  3. Creating backups
  4. Onboarding new team members (cloning all team repos)
  5. Performing Audits

With default configuration ghorg performs two actions.

  1. Will clone a repo if its not inside the clone directory.
  2. If repo does exists locally in the clone directory it will perform a git pull and git clean on the repo.

So when running ghorg a second time on the same org/user, all local changes in the cloned directory by default will be overwritten by what's on GitHub. If you want to work out of this directory, make sure you either rename the directory or set the --no-clean flag on all future clones to prevent losing your changes locally.

ghorg cli example

Supported Providers

The terminology used in ghorg is that of GitHub, mainly orgs/repos. GitLab and BitBucket use different terminology. There is a handy chart thanks to GitLab that translates terminology here. Note, some features may be different for certain providers.

Installation

There are a installation methods available, please choose the one that suits your fancy:

For each installation method, optionally create a ghorg configuration file. See the configuration section for more details.

mkdir -p $HOME/.config/ghorg
curl https://raw.githubusercontent.com/gabrie30/ghorg/master/sample-conf.yaml > $HOME/.config/ghorg/conf.yaml
vi $HOME/.config/ghorg/conf.yaml # To update your configuration

Prebuilt Binaries

See latest release to download directly for

  • Mac (Darwin)
  • Windows
  • Linux

If you don't know which to choose its likely going to be the x86_64 version for your operating system.

Homebrew

brew install gabrie30/utils/ghorg

Golang

# ensure $HOME/go/bin is in your path ($ echo $PATH | grep $HOME/go/bin)

# if using go 1.16+ locally
go install github.com/gabrie30/ghorg@latest

# older go versions can run
go get github.com/gabrie30/ghorg

Configuration

Precedence for configuration is first given to the flags set on the command-line, then to what's set in your $HOME/.config/ghorg/conf.yaml. This file comes from the sample-conf.yaml and can be installed by performing the following.

mkdir -p $HOME/.config/ghorg
curl https://raw.githubusercontent.com/gabrie30/ghorg/master/sample-conf.yaml > $HOME/.config/ghorg/conf.yaml
vi $HOME/.config/ghorg/conf.yaml # To update your configuration

If no configuration file is found ghorg will use its defaults and try to clone a GitHub Org, however an api token is always required.

You can have multiple configuration files which is useful if you clone from multiple SCM providers with different tokens and settings. Alternative configuration files can only be referenced as a command-line flag --config.

If you have multiple different orgs/users/configurations to clone see the ghorg reclone command as a way to manage them.

Note: ghorg will respect the XDG_CONFIG_HOME environment variable if set.

SCM Provider Setup

Note: if you are running into issues, read the troubleshooting and known issues section below

GitHub Setup

  1. Create Personal Access Token with all repo scopes. Update GHORG_GITHUB_TOKEN in your ghorg/conf.yaml or as a cli flag or place it in a file and add the path to GHORG_GITHUB_TOKEN. If your org has Saml SSO in front you will need to give your token those permissions as well, see this doc.
  2. For cloning GitHub Enterprise (self hosted github instances) repos you must set --base-url e.g. ghorg clone <github_org> --base-url=https://internal.github.com
  3. See examples/github.md on how to run

GitHub App Authentication (Advanced)

  1. Create a GitHub App in your Organization. You only need to fill out the required fields. Make sure to give Repository Permissions -> contents -> read only permissions
  2. Install the GitHub App into your Organization
  3. Generate a a private key from the GitHub App, set the location of the key to GHORG_GITHUB_APP_PEM_PATH
  4. Locate the GitHub App ID from the GitHub App, set the value to GHORG_GITHUB_APP_ID
  5. Locate the GitHub Installation ID from the URL of the GitHub app, set the value to GHORG_GITHUB_APP_INSTALLATION_ID. NOTE: you will need to use the actual GitHub url to get this ID, go to your GitHub Organization Settings Page -> Third Party Access -> GitHub Apps -> Configure -> Get ID from URL

GitLab Setup

  1. Create Personal Access Token with the read_api scope (or api for self-managed GitLab older than 12.10). This token can be added to your ghorg/conf.yaml or as a cli flag.
  2. Update the GitLab Specific config in your ghorg/conf.yaml or via cli flags or place it in a file and add the path to GHORG_GITLAB_TOKEN
  3. Update GHORG_SCM_TYPE to gitlab in your ghorg/conf.yaml or via cli flags
  4. See examples/gitlab.md on how to run

Gitea Setup

  1. Create Access Token (Settings -> Applications -> Generate Token)
  2. Update GHORG_GITEA_TOKEN in your ghorg/conf.yaml or use the (--token, -t) flag or place it in a file and add the path to GHORG_GITEA_TOKEN.
  3. Update GHORG_SCM_TYPE to gitea in your ghorg/conf.yaml or via cli flags
  4. See examples/gitea.md on how to run

Bitbucket Setup

App Passwords

  1. To configure with bitbucket you will need to create a new app password and update your $HOME/.config/ghorg/conf.yaml or use the (--token, -t) and (--bitbucket-username) flags.
  2. Update SCM type to bitbucket in your ghorg/conf.yaml or via cli flags
  3. See examples/bitbucket.md on how to run

PAT/OAuth token

  1. Create a PAT
  2. Set the token with GHORG_BITBUCKET_OAUTH_TOKEN in your $HOME/.config/ghorg/conf.yaml or using the --token flag. Make sure you do not have --bitbucket-username set.
  3. Update SCM TYPE to bitbucket in your ghorg/conf.yaml or via cli flags
  4. See examples/bitbucket.md on how to run

How to Use

See examples directory for more SCM specific docs or use the examples command e.g. ghorg examples gitlab

$ ghorg clone kubernetes --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
# Example how to use --token with a file path
$ ghorg clone kubernetes --token=~/.config/ghorg/gitlab-token.txt
$ ghorg clone davecheney --clone-type=user --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
$ ghorg clone gitlab-examples --scm=gitlab --preserve-dir --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
$ ghorg clone gitlab-examples/wayne-enterprises --scm=gitlab --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2
$ ghorg clone all-groups --scm=gitlab --base-url=https://gitlab.internal.yourcompany.com --preserve-dir
$ ghorg clone --help
# view cloned resources
$ ghorg ls
$ ghorg ls someorg
$ ghorg ls someorg | xargs -I %s mv %s bar/

Changing Clone Directories

  1. By default ghorg will clone the org or user repos into a directory like $HOME/ghorg/org. If you want to clone the org to a different directory use the --path flag or set GHORG_ABSOLUTE_PATH_TO_CLONE_TO in your ghorg conf. This value must be an absolute path. For example if you wanted to clone the kubernetes org to /tmp/ghorg you would run the following command.

    $ ghorg clone kubernetes --path=/tmp/ghorg
    

    which would create...

    /tmp/ghorg
    โ””โ”€โ”€ kubernetes
        โ”œโ”€โ”€ apimachinery
        โ”œโ”€โ”€ gengo
        โ”œโ”€โ”€ git-sync
        โ”œโ”€โ”€ kubeadm
        โ”œโ”€โ”€ kubernetes-template-project
        โ”œโ”€โ”€ ...
    
  2. If you want to change the name of the directory the repos get cloned into, set the GHORG_OUTPUT_DIR in your ghorg conf or set the --output-dir flag. For example to clone only the repos starting with sig- from the kubernetes org into a direcotry called kubernetes-sig-only. You would run the following command.

    $ ghorg clone kubernetes --match-regex=^sig- --output-dir=kubernetes-sig-only
    

    which would create...

    $HOME/ghorg
    โ””โ”€โ”€ kubernetes-sig-only
        โ”œโ”€โ”€ sig-release
        โ”œโ”€โ”€ sig-security
        โ””โ”€โ”€ sig-testing
    

Selective Repository Cloning

  • To only clone repos that match regex use --match-regex flag or exclude cloning repos that match regex with --exclude-match-regex
  • To only clone repos that match prefix(s) use --match-prefix flag or exclude cloning repos that match prefix(s) with --exclude-match-prefix
  • To filter out any archived repos while cloning use the --skip-archived flag (not bitbucket)
  • To filter out any forked repos while cloning use the --skip-forks flag
  • Filter by specific repo topics GHORG_TOPICS or --topics will clone only repos with a matching topic. GitHub/GitLab/Gitea only
  • To clone a specific set of repositories, create a file listing the names of these repositories, one per line. Then, use the GHORG_TARGET_REPOS or --target-repos-path flag to specify the path to this file.
  • To exclude specific repositories from being cloned, you can create a ghorgignore file in the $HOME/.config/ghorg directory. Each line in this file should contain a unique identifier of the repository, which is considered a substring. This substring is then compared against each repository's clone URL during the cloning process. If the clone URL contains the substring listed in the ghorgignore file, that repository will be skipped and not cloned. To avoid unintentionally excluding a repository, ensure that each line in the ghorgignore file is as specific as possible. For instance, you could use https://github.com/gabrie30/ghorg.git or [email protected]:gabrie30/ghorg.git, depending on your cloning method. This feature is particularly useful for permanently excluding certain repositories from the cloning process. If you wish to use multiple ghorgignore files or store them in a different location, you can use the --ghorgignore-path flag to specify an alternative path.
    # Create ghorgignore
    touch $HOME/.config/ghorg/ghorgignore
    
    # Update file
    vi $HOME/.config/ghorg/ghorgignore

Creating Backups

When taking backups the notable flags are --backup, --clone-wiki, and --include-submodules. The --backup flag will clone the repo with git clone --mirror. The --clone-wiki flag will include any wiki pages the repo has. If you want to include any submodules you will need --include-submodules. Lastly, if you want to exclude any binary files use the the flag --git-filter=blob:none to prevent them from being cloned.

ghorg clone kubernetes --backup --clone-wiki --include-submodules

This will create a kubernetes_backup directory for the org. Each folder inside will contain the .git contents for the source repo. To restore the code from the .git contents you would move all contents into a .git dir, then run git init inside the dir, then checkout branch e.g.

# inside kubernetes_backup dir, to restore kubelet source code
cd kubelet
mkdir .git
mv -f * .git # moves all contents into .git directory
git init
git checkout master

Reclone Command

The ghorg reclone command is a way to store all your ghorg clone commands in one configuration file and makes calling long or multiple ghorg clone commands easier.

Once your reclone.yaml configuration is set you can call ghorg reclone to clone each entry individually or clone all at once, see examples below.

# To clone all the entries in your reclone.yaml omit any arguments
ghorg reclone
# To run one or more entries you can pass arguments
ghorg reclone kubernetes-sig-staging kubernetes-sig
# To view all your reclone commands
# NOTE: This command prints tokens to stdout
ghorg reclone --list

ghorg reclone example

Setup

Add a reclone.yaml to your $HOME/.config/ghorg directory. You can use the following command to set it for you with examples to use as a template

curl https://raw.githubusercontent.com/gabrie30/ghorg/master/sample-reclone.yaml > $HOME/.config/ghorg/reclone.yaml

Update file with the commands you wish to run.

Docker

The provided images are built for both amd64 and arm64 architectures and are available solely on Github Container Registry ghcr.io.

# Should print help message
# You can also specify a version as the tag, such as ghcr.io/gabrie30/ghorg:v1.9.9
docker run --rm ghcr.io/gabrie30/ghorg:latest

Note: There are also tags available for the latest on trunk, such as master or master-<commit SHA 7 chars>, but these are not recommended.

The commands for ghorg are parsed as docker commands. The entrypoint is the ghorg binary, hence you only need to enter remaining arguments as follows:

docker run --rm ghcr.io/gabrie30/ghorg \
    clone kubernetes --token=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2

The image ships with the following environment variables set:

GHORG_CONFIG=/config/conf.yaml
GHORG_RECLONE_PATH=/config/reclone.yaml
GHORG_ABSOLUTE_PATH_TO_CLONE_TO=/data

These can be overriden, if necessary, by including the -e flag to the docker run comand, e.g. -e GHORG_GITHUB_TOKEN=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2.

Persisting Data on the Host

In order to store data on the host, it is required to bind mount a volume:

  • $HOME/.config/ghorg:/config: Mounts your config directory inside the container, to access config.yaml and reclone.yaml.
  • $HOME/repositories:/data: Mounts your local data directory inside the container, where repos will be downloaded by default.
docker run --rm \
        -e GHORG_GITHUB_TOKEN=bGVhdmUgYSBjb21tZW50IG9uIGlzc3VlIDY2 \
        -v $HOME/.config/ghorg:/config `# optional` \
        -v $HOME/repositories:/data \
        ghcr.io/gabrie30/ghorg:latest \
        clone kubernetes --match-regex=^sig

Note: Altering GHORG_ABSOLUTE_PATH_TO_CLONE_TO will require changing the mount location from /data to the new location inside the container.

A shell alias might make this more practical:

alias ghorg="docker run --rm -v $HOME/.config/ghorg:/config -v $HOME/repositories:/data ghcr.io/gabrie30/ghorg:latest"

# Using the alias: creates and cleans up the container
ghorg clone kubernetes --match-regex=^sig

Windows support

Windows is supported when built with golang or as a prebuilt binary however, the readme and other documentation is not geared towards Windows users.

Alternatively, Windows users can also install ghorg using scoop

scoop bucket add main
scoop install ghorg

Troubleshooting

  • If you are having trouble cloning repos. Try to clone one of the repos locally e.g. manually running git clone https://github.com/your_private_org/your_private_repo.git if this does not work, ghorg will also not work. Your git client must first be setup to clone the target repos. If you normally clone using an ssh key use the --protocol=ssh flag with ghorg. This will fetch the ssh clone urls instead of the https clone urls.
  • If you are cloning a large org you may see Error: open /dev/null: too many open files which means you need to increase your ulimits, there are lots of docs online for this. Another solution is to decrease the number of concurrent clones. Use the --concurrency flag to set to lower than 25 (the default)
  • If your GitHub org is behind SSO, you will need to authorize your token, see here
  • If your GitHub Personal Access Token is only finding public repos, give your token all the repos permissions
  • Make sure your $ git --version is >= 2.19.0
  • Check for other software, such as anti-malware, that could interfere with ghorgs ability to create large number of connections, see issue 132. You can also lower the concurrency with --concurrency=n default is 25.
  • To debug yourself you can call ghorg with the GHORG_DEBUG=true env e.g GHORG_DEBUG=true ghorg clone kubernetes --concurrency=1
  • If you've gotten this far and still have an issue feel free to raise an issue

ghorg's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ghorg's Issues

[feature suggestion] Gitea support

I think it may be good of interest to support Gitea (another simple small forge written in Go for self hosting), with ability to change the base url too (like for Gitlab) Thanks.

More information for: Username for 'https://gitlab.com':

Describe the bug
You are already aware of the bug, but i would like to give some more insight, I believe this occurs on gitlab when using http & having 2fa enable on the account.

I don't have time at the moment to dig deeper into it, let me know if you want some more details & when i have 5 i will get them to you

ghorg open cmd

ghorg open would work like git open/hub browse but for the org

Exit status 128

Describe the bug
============ Issues ============
Problem trying to clone Repo: https://***.git Error: exit status 128

To Reproduce
ghorg clone --scm gitlab --token *** --namespace *** --path F:\GHORG --base-url https://gitlab.***.com/api/v4 --clone-type org ***

Desktop (please complete the following information):

  • OS: [e.g. iOS] - Windows 10

Flags to include or exclude repos from cloning

Would be nice to do something like

ghorg clone someorg --include='/^dept-/'

ghorg clone someorg --exclude='/^not-my-dept-/'

This would be useful for large orgs. Would be nice to create a new ghorg directory for the subset of repos.

Maintain Project Structure as in Version Control

It would be great to maintain the same folder structure as in Gitlab - org/groups/subgroups/repository

When cloned, all the repos get converted to a flat structure and then we have to end up organizing it. Would be great if the tool can do it itself.

Use channels to throttle clones

Is your feature request related to a problem? Please describe.
Ghorg gets a list of clone urls from the SCM, then uses these urls to do a git clone on. The problem is this is done in a loop and on big orgs creates a lot of open file descriptors, sometimes causing issues with ulimits.

Describe the solution you'd like
Use go channels to have at most n git clones running at once, where n is a configurable number in the ghorg/conf.yaml, as one clone finishes the next one would start. This should prevent any issues with ulimits.

branch HEAD is not using master

If you want to clone to HEAD branch, the result is always master

Steps to reproduce the behavior:

  1. checkout a new branch foo (from the master; current leading branch) and make a commit
  2. use --branch=HEAD as argument

Expected behavior
The repository should be cloned including changes of branch foo

Token not taken from conf.yaml file

If I specify the gitlab access token in conf.yaml file, it does not work but if I supply the same token as a command line argument, it works. Looks like there is some issue in retrieving the access token from conf.yaml file.

For me when I tried security find-internet-password -s gitlab.com | grep "acct" | awk -F\" '{ print $4 }' it did not work since I do not have security installed and have not added they keys to the linux keychain.

But I guess that should not be an issue since I anyway gave the access token in the file.

Should use $XDG_CONFIG_HOME/ghorg for config file

Is your feature request related to a problem? Please describe.
On most !OSX unix-like boxen $XDG_CONFIG_HOME (usually $HOME/.config) is a single place to look for all of your application configuration files, making it easy to version control, etc. Having ghorg use $HOME/ghorg leads to a messier $HOME, and yet one more place to hoover things up.

Describe the solution you'd like

If $XDG_CONFIG_HOME is defined, store your configs in $XDG_CONFIG_HOME/ghorg. Otherwise, default - probably to $HOME/.config/ghorg - a number of CLI OSX applications use that now, as well.

Describe alternatives you've considered

Symlinks... :(

Additional context

GHORG_ABSOLUTE_PATH_TO_CLONE_TO dir is created with incorrect perms

when the GHORG_ABSOLUTE_PATH_TO_CLONE_TO dir does not yet exist, ghorg creates it with these perms:

drw-r--r-- 2 curt staff 64 May 26 19:40 ghorg

I think the safest thing to do is create the dir with 700 and let the user update it later if they deem it safe to do so.

have flags for user and org runs

instead of defaulting to github users only after an org is not found, users should be able to specify the type of run they want to perform

e.g.
ghorg -u gabrie30

Password for 'https://<token>@gitlab.com':

Describe the bug
When cloning from GitLab over https, I'm prompted to enter a password since the token is recognized as username.

Expected behavior
GitLab expects 'oauth2' as username when cloning over https. See Stack Overflow Issue.

Screenshots
The log is:

 +-+-+-+-+ +-+-+ +-+-+-+-+-+
 |T|I|M|E| |T|O| |G|H|O|R|G|
 +-+-+-+-+ +-+-+ +-+-+-+-+-+

*************************************
* SCM           : gitlab
* Type          : org
* Protocol      : https
* Branch        : master
* Location      : /data/
* Concurrency   : 1
* Base URL      : https://gitlab.com/api/v4
* Backup        : true
*************************************

7 repos found in my-org

 Password for 'https://<my-token>@gitlab.com': 

Desktop (please complete the following information):

  • OS: docker (golang:latest)

Additional context
The used GitLab account is configured with 2FA.

Blacklists repos or option to ignore GitHub archived repos

I have several repos on GitHub which I forked a while ago but I don't want to backup them cause my changes are minimal or maybe even merged upstream. So I would like an ability to exclude some repos when fetching from e.g. GitHub.

Describe the solution you'd like
I would like being to able pass a list of repository names for the script to ignore. So it will grab all my GitHub repos but I want to exclude some manually.

Or maybe being able to set a flag so the script will only grab non-archived repositories from GitHub. I could possible archive my lesser repositories on GitHub and the script would automatically ignore them.

Thanks for this project! I am new to this but I like it!

Golang installation fails due to

Golang installation fails

To Reproduce
Steps to reproduce the behavior:

  1. Execute go get -u github.com/gabrie30/ghorg
  2. See following:
package gopkg.in/ini.v1: unrecognized import path "gopkg.in/ini.v1" (https fetch: Get https://gopkg.in/ini.v1?go-get=1: dial tcp 91.189.92.74:443: i/o timeout)
# cd /home/est/winhome/go/src/gopkg.in/yaml.v2; git pull --ff-only
fatal: unable to access 'https://gopkg.in/yaml.v2/': Failed to connect to gopkg.in port 443: Connection refused
package gopkg.in/yaml.v2: exit status 1

Expected behavior
Successful installation

Desktop:

  • Windows 10 plus Debian 10.1 as Linux Subsystem

Personal Access Token persisted to git remotes

I've recently started using ghorg again (thanks for an amazing tool!)

I noticed today when looking at a recent ghorg that my personal access token has been persisted to the origin remote address which isn't something I'd expect with generally using the credential helper on OSX for git actions.

To Reproduce
Steps to reproduce the behavior:

  1. Run ghorg on an organization
  2. cd in ~/Desktop/${ORG}_ghorg/${REPO}
  3. run git remote -v (or check repo/.gitconfig/config)
  4. See personal access token it all its glory

Expected behavior
PATs to not be stored unencrypted on my machine

Building ghorg fails with gitlab.NewClient assignment mismatch

Describe the bug
A clear and concise description of what the bug is.

When trying to build ghorg, by doing

go get -u github.com/gabrie30/ghorg
go build  github.com/gabrie30/ghorg

It fails with:

# github.com/gabrie30/ghorg/cmd
gopath/src/github.com/gabrie30/ghorg/cmd/clone_gitlab.go:14:9: assignment mismatch: 1 variable but gitlab.NewClient returns 2 values
gopath/src/github.com/gabrie30/ghorg/cmd/clone_gitlab.go:14:28: cannot use nil as type string in argument to gitlab.NewClient
gopath/src/github.com/gabrie30/ghorg/cmd/clone_gitlab.go:14:43: cannot use os.Getenv("GHORG_GITLAB_TOKEN") (type string) as type gitlab.ClientOptionFunc in argument to gitlab.NewClient
gopath/src/github.com/gabrie30/ghorg/cmd/clone_gitlab.go:95:9: assignment mismatch: 1 variable but gitlab.NewClient returns 2 values
gopath/src/github.com/gabrie30/ghorg/cmd/clone_gitlab.go:95:28: cannot use nil as type string in argument to gitlab.NewClient
gopath/src/github.com/gabrie30/ghorg/cmd/clone_gitlab.go:95:43: cannot use os.Getenv("GHORG_GITLAB_TOKEN") (type string) as type gitlab.ClientOptionFunc in argument to gitlab.NewClient

To Reproduce
Steps to reproduce the behavior:
See description.

Expected behavior
It should build and hopefully execute.

Screenshots
Not needed.

Desktop (please complete the following information):

  • OS: Ubuntu 16.04
  • Version: latest master of the repo, Go version: go version go1.14.1 linux/amd64

Additional context
This is my first time using a Go project.

Prompt for password when use api token

Describe the bug
When cloning from GitLab over https, I'm prompted to enter a password since the token is recognized as username.

Screenshots
The log is:

+-+-+-+-+ +-+-+ +-+-+-+-+-+
|T|I|M|E| |T|O| |G|H|O|R|G|
+-+-+-+-+ +-+-+ +-+-+-+-+-+


  • SCM : gitlab
  • Type : org
  • Protocol : https
  • Branch : master
  • Location : /home/osboxes/Desktop/
  • Concurrency : 25
  • Base URL : https://git.pl/api/v4
  • Backup : true

118 repos found in 316


7 repos found in my-org

Password for 'https://[email protected]':

Prompt for password multiple times.

Desktop (please complete the following information):

OS: ubuntu
osboxes@mail:~/d00b$ brew install gabrie30/utils/ghorg
Warning: gabrie30/utils/ghorg 1.2.0 is already installed and up-to-date
To reinstall 1.2.0, run brew reinstall ghorg

I don't know how to install the latest version of ghorg :(.

Additional context
The used GitLab account is configured with 2FA.

Ability to use --mirror when cloning

Well sorry, but another idea that could help to make good backups:

I am using ghorg to make backups of GitHub and GitLab projects and it would be nice if it would be possible to clone the repos using the --mirror parameter of git clone. In that case you get a bare repo and for example you don't get a working copy (which is not needed for the backup).

So in that case also the branch parameter would not be needed.

When starting ghorg and the repos already exist locally they could be updated using git remote update.

Thank you!

Homebrew install fails

Describe the bug
I cannot get ghorg to install on my OSX via homebrew, tried both with go 1.14 and downgrading to 1.13 (this might no be the issue however).

To Reproduce
Steps to reproduce the behavior:
brew install gabrie30/utils/ghorg

Expected behavior
Habe ghorg installed and working

Desktop (please complete the following information):

  • OS: OSX
  • Version 10.13.6

Additional context
`go
build
-o
/usr/local/Cellar/ghorg/1.2.0/bin/ghorg
.

github.com/korovkin/limiter

SIGILL: illegal instruction
PC=0x1064dc0 m=4 sigcode=1

goroutine 24 [running]:
runtime.asyncPreempt()
/usr/local/Cellar/go/1.14/libexec/src/runtime/preempt_amd64.s:8 fp=0xc000689d18 sp=0xc000689d10 pc=0x1064dc0
cmd/compile/internal/ssa.liveValues(0xc0006f0160, 0xc000690706, 0x2, 0x2, 0xc00069a000, 0x1c, 0x4e, 0xc00069c000, 0x5, 0x20)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/ssa/deadcode.go:153 +0xcea fp=0xc000689e68 sp=0xc000689d18 pc=0x123b05a
cmd/compile/internal/ssa.deadcode(0xc0006f0160)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/ssa/deadcode.go:215 +0x277 fp=0xc00068a100 sp=0xc000689e68 pc=0x123b6e7
cmd/compile/internal/ssa.Compile(0xc0006f0160)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/ssa/compile.go:92 +0x9a5 fp=0xc00068dd40 sp=0xc00068a100 pc=0x1232495
cmd/compile/internal/gc.buildssa(0xc000078c60, 0x3, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/ssa.go:445 +0xcd8 fp=0xc00068ded0 sp=0xc00068dd40 pc=0x18e5af8
cmd/compile/internal/gc.compileSSA(0xc000078c60, 0x3)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/pgen.go:298 +0x5d fp=0xc00068df98 sp=0xc00068ded0 pc=0x18ae7cd
cmd/compile/internal/gc.compileFunctions.func2(0xc00039d0e0, 0xc0000b47f0, 0x3)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/pgen.go:363 +0x49 fp=0xc00068dfc8 sp=0xc00068df98 pc=0x1976009
runtime.goexit()
/usr/local/Cellar/go/1.14/libexec/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc00068dfd0 sp=0xc00068dfc8 pc=0x1063551
created by cmd/compile/internal/gc.compileFunctions
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/pgen.go:361 +0x128

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc0000b47f8)
/usr/local/Cellar/go/1.14/libexec/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc0000b47f0)
/usr/local/Cellar/go/1.14/libexec/src/sync/waitgroup.go:130 +0x64
cmd/compile/internal/gc.compileFunctions()
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/pgen.go:373 +0x1ce
cmd/compile/internal/gc.Main(0x1a9a908)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/main.go:724 +0x33a5
main.main()
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/main.go:52 +0xac

rax 0x1
rbx 0xc000568dc8
rcx 0x1c
rdx 0xc000568e20
rdi 0xc00069c130
rsi 0xc000690706
rbp 0xc000689e58
rsp 0xc000689d10
r8 0x2
r9 0x2
r10 0xc000568ab8
r11 0x0
r12 0xc00069a000
r13 0xc00069a006
r14 0xc00069c100
r15 0x20
rip 0x1064dc0
rflags 0x10202
cs 0x2b
fs 0x0
gs 0x0

github.com/hashicorp/hcl/hcl/strconv

SIGILL: illegal instruction
PC=0x1064dc0 m=0 sigcode=1

goroutine 1 [running]:
runtime.asyncPreempt()
/usr/local/Cellar/go/1.14/libexec/src/runtime/preempt_amd64.s:8 fp=0xc000166e48 sp=0xc000166e40 pc=0x1064dc0
cmd/compile/internal/gc.walkcompare(0xc0003b9480, 0xc000167598, 0xc0003ad300)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/walk.go:3073 +0x9 fp=0xc000166e50 sp=0xc000166e48 pc=0x196d639
cmd/compile/internal/gc.walkexpr(0xc0003b9480, 0xc000167598, 0x1)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/walk.go:556 +0x6476 fp=0xc0001674a8 sp=0xc000166e50 pc=0x195a886
cmd/compile/internal/gc.walkstmt(0xc0003b9180, 0xc0003b9200)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/walk.go:254 +0xf09 fp=0xc000167658 sp=0xc0001674a8 pc=0x1953089
cmd/compile/internal/gc.walkstmtlist(0xc000572900, 0x5, 0x8)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/walk.go:80 +0x46 fp=0xc000167680 sp=0xc000167658 pc=0x1952086
cmd/compile/internal/gc.walk(0xc0001042c0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/walk.go:64 +0x3b0 fp=0xc000167788 sp=0xc000167680 pc=0x1951bd0
cmd/compile/internal/gc.compile(0xc0001042c0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/pgen.go:236 +0x6b fp=0xc000167800 sp=0xc000167788 pc=0x18ae43b
cmd/compile/internal/gc.funccompile(0xc0001042c0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/pgen.go:222 +0xc1 fp=0xc000167858 sp=0xc000167800 pc=0x18ae2c1
cmd/compile/internal/gc.Main(0x1a9a908)
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/internal/gc/main.go:714 +0x3299 fp=0xc000167f10 sp=0xc000167858 pc=0x1886379
main.main()
/usr/local/Cellar/go/1.14/libexec/src/cmd/compile/main.go:52 +0xac fp=0xc000167f88 sp=0xc000167f10 pc=0x19c57cc
runtime.main()
/usr/local/Cellar/go/1.14/libexec/src/runtime/proc.go:203 +0x212 fp=0xc000167fe0 sp=0xc000167f88 pc=0x10348d2
runtime.goexit()
/usr/local/Cellar/go/1.14/libexec/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc000167fe8 sp=0xc000167fe0 pc=0x1063551

rax 0xc000167598
rbx 0x0
rcx 0xc000000180
rdx 0x3c
rdi 0xc0003b9480
rsi 0xc0003b9490
rbp 0xc000167498
rsp 0xc000166e40
r8 0x14
r9 0xfffffffb
r10 0x260
r11 0x11
r12 0x18
r13 0x0
r14 0x1c291a4
r15 0x0
rip 0x1064dc0
rflags 0x10293
cs 0x2b
fs 0x0
gs 0x0
SIGILL: illegal instruction
PC=0x1065ae0 m=10 sigcode=1

goroutine 7 [running]:
runtime.asyncPreempt()
/usr/local/Cellar/go/1.14/libexec/src/runtime/preempt_amd64.s:8 fp=0xc0000bbe70 sp=0xc0000bbe68 pc=0x1065ae0
cmd/go/internal/work.(*Builder).Do.func2(0xc0005ac3c0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:142 +0x12c fp=0xc0000bbf10 sp=0xc0000bbe70 pc=0x147d8dc
cmd/go/internal/work.(*Builder).Do.func3(0xc000500204, 0xc000153360, 0xc00000eb60)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:178 +0x76 fp=0xc0000bbfc8 sp=0xc0000bbf10 pc=0x147dc36
runtime.goexit()
/usr/local/Cellar/go/1.14/libexec/src/runtime/asm_amd64.s:1373 +0x1 fp=0xc0000bbfd0 sp=0xc0000bbfc8 pc=0x1064271
created by cmd/go/internal/work.(*Builder).Do
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:165 +0x38a

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc000500204)
/usr/local/Cellar/go/1.14/libexec/src/runtime/sema.go:56 +0x42
sync.(*WaitGroup).Wait(0xc000500204)
/usr/local/Cellar/go/1.14/libexec/src/sync/waitgroup.go:130 +0x64
cmd/go/internal/work.(*Builder).Do(0xc000153360, 0xc000592000)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:187 +0x3ae
cmd/go/internal/work.runBuild(0x1ac4fe0, 0xc00010e090, 0x1, 0x1)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/build.go:420 +0x6a2
main.main()
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/main.go:189 +0x569

goroutine 6 [runnable]:
syscall.syscall(0x10b08b0, 0xf, 0xc0005f4e50, 0x8, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/runtime/sys_darwin.go:63 +0x2e
syscall.readlen(0xf, 0xc0005f4e50, 0x8, 0x12, 0xc000232000, 0x60)
/usr/local/Cellar/go/1.14/libexec/src/syscall/syscall_darwin.go:364 +0x62
syscall.forkExec(0xc0002fbe00, 0x3b, 0xc0001e6a20, 0x11, 0x12, 0xc0005f4f70, 0x5f, 0xf5b2b00020400, 0xc000290000)
/usr/local/Cellar/go/1.14/libexec/src/syscall/exec_unix.go:210 +0x3c6
syscall.StartProcess(...)
/usr/local/Cellar/go/1.14/libexec/src/syscall/exec_unix.go:248
os.startProcess(0xc0002fbe00, 0x3b, 0xc0001e6a20, 0x11, 0x12, 0xc0005f5108, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec_posix.go:52 +0x2c0
os.StartProcess(0xc0002fbe00, 0x3b, 0xc0001e6a20, 0x11, 0x12, 0xc0005f5108, 0x60, 0x0, 0xc0005f5004)
/usr/local/Cellar/go/1.14/libexec/src/os/exec.go:102 +0x7c
os/exec.(*Cmd).Start(0xc00029cdc0, 0x8031df0, 0x1ea3201c7375)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:417 +0x50c
os/exec.(*Cmd).Run(0xc00029cdc0, 0x1297c297, 0x1acefe0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:337 +0x2b
cmd/go/internal/work.(*Builder).runOut(0xc000153360, 0xc0005a4280, 0xc0003e0910, 0x4e, 0x0, 0x0, 0x0, 0xc000350e00, 0x14, 0x1c, ...)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:1928 +0x5bc
cmd/go/internal/work.(*Builder).run(0xc000153360, 0xc0005a4280, 0xc0003e0910, 0x4e, 0xc000248ae1, 0x15, 0x0, 0x0, 0x0, 0xc000350e00, ...)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:1853 +0xb5
cmd/go/internal/work.gcToolchain.symabis.func1(0xc00027a000, 0xc0003bc480, 0x3, 0x3, 0xc00002ade0, 0x2b, 0x2b, 0x1f)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/gc.go:299 +0x32a
cmd/go/internal/work.gcToolchain.symabis(0xc000153360, 0xc0005a4280, 0xc0003bc480, 0x3, 0x3, 0x282, 0x4f9, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/gc.go:306 +0x12b
cmd/go/internal/work.(*Builder).build(0xc000153360, 0xc0005a4280, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:642 +0x120b
cmd/go/internal/work.(*Builder).Do.func2(0xc0005a4280)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:118 +0x358
cmd/go/internal/work.(*Builder).Do.func3(0xc000500204, 0xc000153360, 0xc00000eb60)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:178 +0x76
created by cmd/go/internal/work.(*Builder).Do
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:165 +0x38a

goroutine 8 [syscall]:
syscall.syscall6(0x10b0640, 0x6376, 0xc00056cfd4, 0x0, 0xc000558090, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/runtime/sys_darwin.go:74 +0x2e
syscall.wait4(0x6376, 0xc00056cfd4, 0x0, 0xc000558090, 0x90, 0x1620ae0, 0x1)
/usr/local/Cellar/go/1.14/libexec/src/syscall/zsyscall_darwin_amd64.go:44 +0x87
syscall.Wait4(0x6376, 0xc00056d024, 0x0, 0xc000558090, 0x1578460, 0x0, 0x100000104f123)
/usr/local/Cellar/go/1.14/libexec/src/syscall/syscall_bsd.go:129 +0x51
os.(*Process).wait(0xc000421470, 0x1680820, 0x1680828, 0x1680818)
/usr/local/Cellar/go/1.14/libexec/src/os/exec_unix.go:38 +0x7b
os.(*Process).Wait(...)
/usr/local/Cellar/go/1.14/libexec/src/os/exec.go:125
os/exec.(*Cmd).Wait(0xc0003fcb00, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:502 +0x60
os/exec.(*Cmd).Run(0xc0003fcb00, 0x121387e7, 0x1acefe0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:340 +0x5c
cmd/go/internal/work.(*Builder).runOut(0xc000153360, 0xc000597400, 0xc0003a2360, 0x58, 0x0, 0x0, 0x0, 0xc0002ca3c0, 0xf, 0x14, ...)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:1928 +0x5bc
cmd/go/internal/work.gcToolchain.gc(0xc000153360, 0xc000597400, 0xc0004211a0, 0x2b, 0xc000170480, 0x2df, 0x413, 0x0, 0x0, 0xc00056d500, ...)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/gc.go:142 +0xc98
cmd/go/internal/work.(*Builder).build(0xc000153360, 0xc000597400, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:678 +0x1715
cmd/go/internal/work.(*Builder).Do.func2(0xc000597400)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:118 +0x358
cmd/go/internal/work.(*Builder).Do.func3(0xc000500204, 0xc000153360, 0xc00000eb60)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:178 +0x76
created by cmd/go/internal/work.(*Builder).Do
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:165 +0x38a

goroutine 9 [chan receive]:
os/exec.(*Cmd).Wait(0xc0003fc9a0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:510 +0x125
os/exec.(*Cmd).Run(0xc0003fc9a0, 0x113ae2ea, 0x1acefe0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:340 +0x5c
cmd/go/internal/work.(*Builder).runOut(0xc000153360, 0xc000597040, 0xc00052d080, 0x71, 0x0, 0x0, 0x0, 0xc0002ca3c0, 0x11, 0x14, ...)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:1928 +0x5bc
cmd/go/internal/work.gcToolchain.gc(0xc000153360, 0xc000597040, 0xc00002b710, 0x2b, 0xc00017a1c0, 0x61, 0xd1, 0x0, 0x0, 0xc00056f500, ...)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/gc.go:142 +0xc98
cmd/go/internal/work.(*Builder).build(0xc000153360, 0xc000597040, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:678 +0x1715
cmd/go/internal/work.(*Builder).Do.func2(0xc000597040)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:118 +0x358
cmd/go/internal/work.(*Builder).Do.func3(0xc000500204, 0xc000153360, 0xc00000eb60)
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:178 +0x76
created by cmd/go/internal/work.(*Builder).Do
/usr/local/Cellar/go/1.14/libexec/src/cmd/go/internal/work/exec.go:165 +0x38a

goroutine 55 [IO wait]:
internal/poll.runtime_pollWait(0x9259508, 0x72, 0xffffffffffffffff)
/usr/local/Cellar/go/1.14/libexec/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc0001369d8, 0x72, 0x201, 0x200, 0xffffffffffffffff)
/usr/local/Cellar/go/1.14/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
/usr/local/Cellar/go/1.14/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0001369c0, 0xc0001ce000, 0x200, 0x200, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/internal/poll/fd_unix.go:169 +0x201
os.(*File).read(...)
/usr/local/Cellar/go/1.14/libexec/src/os/file_unix.go:263
os.(*File).Read(0xc000524898, 0xc0001ce000, 0x200, 0x200, 0x1046dd2, 0xc0001365c8, 0xc00004aea0)
/usr/local/Cellar/go/1.14/libexec/src/os/file.go:116 +0x71
bytes.(*Buffer).ReadFrom(0xc00046e570, 0x172c8e0, 0xc000524898, 0x9215300, 0xc00046e570, 0xc00004af01)
/usr/local/Cellar/go/1.14/libexec/src/bytes/buffer.go:204 +0xb1
io.copyBuffer(0x172bd00, 0xc00046e570, 0x172c8e0, 0xc000524898, 0x0, 0x0, 0x0, 0x1006b35, 0xc000136720, 0xc00004afb0)
/usr/local/Cellar/go/1.14/libexec/src/io/io.go:391 +0x2fc
io.Copy(...)
/usr/local/Cellar/go/1.14/libexec/src/io/io.go:364
os/exec.(*Cmd).writerDescriptor.func1(0xc000136720, 0xc00004afb0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:310 +0x63
os/exec.(*Cmd).Start.func1(0xc0003fcb00, 0xc0003ba1a0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:436 +0x27
created by os/exec.(*Cmd).Start
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:435 +0x608

goroutine 27 [runnable]:
internal/poll.runtime_pollWait(0x9259c08, 0x72, 0xffffffffffffffff)
/usr/local/Cellar/go/1.14/libexec/src/runtime/netpoll.go:203 +0x55
internal/poll.(*pollDesc).wait(0xc0004835d8, 0x72, 0x201, 0x200, 0xffffffffffffffff)
/usr/local/Cellar/go/1.14/libexec/src/internal/poll/fd_poll_runtime.go:87 +0x45
internal/poll.(*pollDesc).waitRead(...)
/usr/local/Cellar/go/1.14/libexec/src/internal/poll/fd_poll_runtime.go:92
internal/poll.(*FD).Read(0xc0004835c0, 0xc0000aa400, 0x200, 0x200, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/internal/poll/fd_unix.go:169 +0x201
os.(*File).read(...)
/usr/local/Cellar/go/1.14/libexec/src/os/file_unix.go:263
os.(*File).Read(0xc0004d62d8, 0xc0000aa400, 0x200, 0x200, 0x0, 0x0, 0xc0005096a0)
/usr/local/Cellar/go/1.14/libexec/src/os/file.go:116 +0x71
bytes.(*Buffer).ReadFrom(0xc0003bca50, 0x172c8e0, 0xc0004d62d8, 0x9215300, 0xc0003bca50, 0x1)
/usr/local/Cellar/go/1.14/libexec/src/bytes/buffer.go:204 +0xb1
io.copyBuffer(0x172bd00, 0xc0003bca50, 0x172c8e0, 0xc0004d62d8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/io/io.go:391 +0x2fc
io.Copy(...)
/usr/local/Cellar/go/1.14/libexec/src/io/io.go:364
os/exec.(*Cmd).writerDescriptor.func1(0x0, 0x0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:310 +0x63
os/exec.(*Cmd).Start.func1(0xc0003fc9a0, 0xc0002f69e0)
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:436 +0x27
created by os/exec.(*Cmd).Start
/usr/local/Cellar/go/1.14/libexec/src/os/exec/exec.go:435 +0x608

rax 0xb
rbx 0xc000592000
rcx 0xc000153360
rdx 0xc000349380
rdi 0x8
rsi 0xc0005ac3c0
rbp 0xc0000bbf00
rsp 0xc0000bbe68
r8 0xc0005c0780
r9 0x17
r10 0x16
r11 0x0
r12 0x0
r13 0x26
r14 0x25
r15 0x100
rip 0x1065ae0
rflags 0x10246
cs 0x2b
fs 0x0
gs 0x0

HOMEBREW_VERSION: 2.2.9-23-g78140ce
ORIGIN: https://github.com/Homebrew/brew
HEAD: 78140cef4aea88c693d7f28a9ff6f8c288d0b944
Last commit: 3 hours ago
Core tap ORIGIN: https://github.com/Homebrew/homebrew-core
Core tap HEAD: abde67b1e88d2872b5eb26cfd1ba4589bc7e0c71
Core tap last commit: 39 minutes ago
HOMEBREW_PREFIX: /usr/local
HOMEBREW_CACHE: /Users/me/Library/Caches/Homebrew
HOMEBREW_LOGS: /Users/me/Library/Logs/Homebrew
CPU: quad-core 64-bit nehalem
Homebrew Ruby: 2.6.3 => /usr/local/Homebrew/Library/Homebrew/vendor/portable-ruby/2.6.3/bin/ruby
Clang: 10.0 build 1000
Git: 2.25.0 => /usr/local/bin/git
Curl: 7.54.0 => /usr/bin/curl
Java: 11.0.1
macOS: 10.13.6-x86_64
CLT: 10.1.0.0.1.1539992718
Xcode: N/A

HOMEBREW_CC: clang
HOMEBREW_CXX: clang++
MAKEFLAGS: -j4
CMAKE_PREFIX_PATH: /usr/local
CMAKE_INCLUDE_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/usr/include/libxml2:/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Headers
CMAKE_LIBRARY_PATH: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk/System/Library/Frameworks/OpenGL.framework/Versions/Current/Libraries
PKG_CONFIG_LIBDIR: /usr/lib/pkgconfig:/usr/local/Homebrew/Library/Homebrew/os/mac/pkgconfig/10.13
HOMEBREW_GIT: git
HOMEBREW_SDKROOT: /Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
ACLOCAL_PATH: /usr/local/share/aclocal
PATH: /usr/local/Homebrew/Library/Homebrew/shims/mac/super:/usr/local/opt/go/bin:/usr/bin:/bin:/usr/sbin:/sbin
`

Don't make assumptions about where to clone to

Please don't make assumptions about where I'd like the cloned repos to go to.

Currently I can configure the environment variable GHORG_ABSOLUTE_PATH_TO_CLONE_TO for example:

$ GHORG_GITHUB_TOKEN="${GITHUB_TOKEN}" GHORG_ABSOLUTE_PATH_TO_CLONE_TO="$(pwd)" ghorg myorg

But this insists on cloning the repos to $PWD/myorg_ghorg/...

It would be nice if ghorg had flags and arguments as opposed to just relying on the environment and/or a config file. See #34

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.