Files
orion/docs/development/synology-github-repo.md
Samir Boulahtit daec462847 docs: add comprehensive documentation for today's work
Technical Documentation:
- docs/development/architecture-fixes-2026-01.md: Complete guide to
  all architecture validation fixes (62 -> 0 errors)

User Guides:
- docs/guides/email-templates.md: How-to guide for vendors and admins
  to use the email template customization system

Implementation Docs:
- docs/implementation/password-reset-implementation.md: Technical
  documentation for the password reset feature
- Updated email-templates-architecture.md with EmailTemplateService
  documentation and related links

Bugfix:
- Fixed TemplateListItem Pydantic model to match service output
  (languages vs available_languages field name)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-03 19:07:09 +01:00

3.4 KiB
Raw Blame History

Source: https://kb.synology.com/tr-tr/DSM/help/Git/git?version=7


Git Server Synology DSM 7

Git is an open-source, distributed version control system that helps you manage programming code, documents, or other files in an organized and efficient manner. It also allows for easy collaboration with multiple groups of people.


🛠️ Create a Git Repository

  1. Sign in to DSM using an account with administrative privileges.

  2. Go to:
    Control Panel > Terminal & SNMP > Terminal
    → Enable SSH service.

  3. Go to:
    Control Panel > Shared Folder
    → Create a shared folder for Git repositories.

  4. On your computer, access Synology NAS via SSH:

    ssh [admin_user]@[NAS_IP_or_hostname] -p [SSH_port]
    

    Example:

    ssh myadminuser@192.168.1.2 -p 22
    
  5. Change to the shared folder:

    cd /[Volume]/[SharedFolder]/
    

    Example:

    cd /volume1/mysharefolder/
    
  6. Create a folder for the Git repository:

    mkdir [FolderName]
    cd [FolderName]
    
  7. Initialize a bare Git repository:

    git init --bare
    

Adding new repository on NAS DS223J

 > ssh boulaht1@DS223J -p 22
 > sudo -i
 > cd /volume1/git-repos/
 > git --bare init my-repo.git
 > chown -R git-boulaht1:users my-repo.git
 > cd my-repo.git/

Steps to Push Local Git Repo to Synology NAS

  1. Ensure your Synology Git repo is initialized as a bare repo: On the NAS (via SSH or File Station), the repo should have been created like this:

    git init --bare /volume1/git-repos/myproject.git
    
  2. On your local machine, navigate to your existing Git repo:

    cd /path/to/your/local/repo
    
  3. Add the Synology NAS as a remote:

    git remote add origin ssh://youruser@your-nas-ip:/volume1/git-repos/myproject.git
    

    Replace:

    • youruser with your DSM username
    • your-nas-ip with the IP address or hostname of your NAS
    • /volume1/git-repos/myproject.git with the full path to your bare repo
  4. Push your local repo to the NAS:

    git push -u origin master
    

If error message fatal: detected dubious ownership in repository at '/volume1/git-repos/my-repo.git' - Execute:

git config --global --add safe.directory /volume1/git-repos/test-repo.git

Go on the Synology and right click on the folder and select Properties and then Permission and then tick boxes apply to sub folder and files (git-boulaht1 should be read write on the folder)

⚠️ Note:
Do not perform the above commands with root permissions.
Git Server no longer supports git-shell commands due to security concerns.
For git-shell access, consider using container-based Git services.


🔄 Clone Git Repositories from DSM

  1. Install Git on your computer.

  2. Ensure the following:

    • SSH service is enabled on DSM.
    • Your user account has access permissions to the repository.
    • Your user account has Read/Write permissions for the shared folder.
  3. Clone the repository:

    git clone ssh://[username]@[NAS_IP_or_hostname]:[repository_path]
    

    Example:

    git clone ssh://mygituser@192.168.1.2:/volume1/myreposfolder/myrepo1
    
  4. Access the cloned repository:

    cd [repository_path]
    

    Example:

    cd /volume1/mysharefolder/myrepo1