Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8559859
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:09:02+00:00 2026-06-11T16:09:02+00:00

I created a user name git. And here’s the passwd file: git:x:1001:1001:git:/home/git/test.git:/bin/bash Then created

  • 0

I created a user name git. And here’s the passwd file:

git:x:1001:1001:git:/home/git/test.git:/bin/bash

Then created a bared repo named ‘test.git’. The full path is ‘/home/git/test.git’.

If I add the remote like beblow, it will works:

git add remote origin git@abc.com:./

But I wonder if below will work? Do I need some addition settings in git?

git add remote origin git@abc.com
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T16:09:03+00:00Added an answer on June 11, 2026 at 4:09 pm

    It’s not clear why you want to have your server setup as you suggest – it’s certainly not normal.

    git as a bash user is INsecure

    if you leave your git config as it is in the question you are relying on trust alone that anyone who has access as git does not do the following:

    ssh git@abc.com
    cd ..
    ls -la // have a look
    rm -rf test.git // delete git repo
    cd / // go have a hack around
    etc.
    

    Do it the normal way

    Setting up a git server, is easy – almost trivial.

    if you update your passwd file so it looks like this:

    git:x:1001:1001::/home/git:/usr/bin/git-shell
    

    Then the user git can do absolutely nothing except perform git commands.

    As such you’d then do:

    git add remote origin git@abc.com:test.git
    git pull // etc
    

    git shell is secure

    None of these things will work for a user that has git-shell as their login shell:

    ssh git@abc.com
    
    git remote add another git@abc.com:another.git
    git push another // attempting to create a new repo
    
    etc.
    

    The only thing it lets you do is effectively pull and push to the remote.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've created a user login dialog box that compares the user's name and password
Somehow, my global git (msysgit) settings for user.name and user.email (and god knows what
I created a WordPress site on phpfog, then used git to download it locally.
So I've created a repo using Git Bash, and it works (Local and Remote
I've created a simple Project model with four attributes: Project name:string description:text complete:boolean user_id:integer
I want to create a simple user registration form with First / Last name,
I have created a VBScript which pulls the service tag, username, and computer name
I created a local GIT repository on Windows. Let's call it AAA. I staged,
I created a git repository and updated it with some stuff. Later I created
I created a github new repository first in github webpage and then I opened

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.