DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones AWS Cloud
by AWS Developer Relations
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Partner Zones
AWS Cloud
by AWS Developer Relations
The Latest "Software Integration: The Intersection of APIs, Microservices, and Cloud-Based Systems" Trend Report
Get the report
  1. DZone
  2. Testing, Deployment, and Maintenance
  3. Deployment
  4. Gitosis-ng: Simple, Self-service Git Repositories

Gitosis-ng: Simple, Self-service Git Repositories

Joe Miller user avatar by
Joe Miller
·
Apr. 29, 12 · Interview
Like (0)
Save
Tweet
Share
9.51K Views

Join the DZone community and get the full member experience.

Join For Free

Gitosis-ng — it’s gitosis with some new features to help users work with the git server. Mainly implemented with commands sent via ssh, ex:

list available commands:

$ ssh git@git.example.com help

    add-repo        : Create new repository. Usage: 'add-repo repo_name'
    help            : Get list of available commands
    list            : Get detailed list of git repositories
    list-json       : Get detailed list of repositories in JSON format
    list-short      : Get simple list of git repositories
    list-yaml       : Get detailed list of repositories in YAML format

List available repos:

$ ssh git@git.example.com list
    Repository  : myproject.git
     Initialized: no
     Your Access: read/write
     Owner      : jmiller
     URL        :
     Description:

     Repository  : otherproject.git
     Initialized: no
     Your Access: readonly
     Owner      : bsmith
     URL        :
     Description:

Create new repo:

$ ssh git@git.example.com add-repo myproject
 
    Created repository: myproject
 
    Next Steps:
      mkdir myproject
      cd myproject
      git init
      touch README
      git add README
      git commit -a -m 'first commit'
      git remote add origin git@GIT_SERVER_ADDRESS:myproject.git
      git push origin master
 
    Existing Git repo?
      cd myproject
      git remote add origin git@GIT_SERVER_ADDRESS:myproject.git
      git push origin master

I am a fan github.com and gitorious.com, but we needed something internal that would be simpler than gitorious to get up and running.

The next best thing I could find was gitosis which is very simple and straightforward.

However, gitosis lacked the user-friendly features I liked about github/gitorious. For example, how about a real simple way to list repos?

So, I decided to add “self-service” features to gitosis and call it gitosis-ng.  I want my users to be able to do all of these tasks on their own:

  • List available repos
  • Create new repos
  • Give permissions to other users on repos they control
  • Set metadata on repos (eg: URL, owner contact info, description)

So far I have implemented the first 2 features in this list and will be working on the remaining features as time permits.

Eventually I would love to find a way to allow users to self-register with gitosis-ng, but this could be challenging since gitosis-ng works entirely over SSH and relies on users having an SSH key registered with the server before they can execute commands.

gitosis-ng is available on github:  http://github.com/joemiller/gitosis-ng

Self-service Git

Published at DZone with permission of Joe Miller, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • How To Best Use Java Records as DTOs in Spring Boot 3
  • How to Use Buildpacks to Build Java Containers
  • 4 Best dApp Frameworks for First-Time Ethereum Developers
  • What Is JavaScript Slice? Practical Examples and Guide

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: