Skip to content

elalemanyo/1and1-ionos-git-deployment

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

1&1 + GIT

1&1 IONOS Git deployment

Using 1&1 IONOS git repository for website deployment

SSH into your 1&1 account

For host name, type the host name displayed in IONOS (e.g. home.xxxxxxxxx.1and1-data.host). The ssh username is the same as the main FTP user. This is the only username that has ssh access.

ssh [email protected]

Create deployment script

cd ~
mkdir lib
cd lib
nano post-receive.sh

Copy code from post-receive.sh, and after saving make sure the post-receive.sh script is executable by running: chmod +x post-receive.sh

Create bare repository

mkdir repositories
cd repositories
git init --bare my_repo.git

Create post-receive git hook

cd my_repo.git/hooks
nano post-receive

Inside pase this code:

#!/bin/sh
. ~/lib/post-receive.sh

And make sure the post-receive hook script is executable:

chmod +x post-receive

Clone repository on your local machine

git clone ssh://[email protected]/~/repositories/my_repo.git

Or add remote ___location for an existing repository

git remote add origin ssh://[email protected]/~/repositories/my_repo.git

After push

Find your deployed code here: ~/www/[repo_name]/[branch]

About

Using 1&1 IONOS git repository for website deployment

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages