メイン

Git アーカイブ

2020年10月11日

CentOS6 での Git2.*

 2017年ごろ CentOS6.9 サーバへインストールしたGit。
$ wget http://wing-repo.net/wing/6/EL6.wing.repo
$ sudo mv EL6.wing.repo /etc/yum.repos.d/.
$ sudo yum -y --enablerepo=wing install git
$ git --version
git version 2.3.7
 その後 2018年ごろから リポジトリー wing がなくなり ius に。
$ sudo yum install https://repo.ius.io/ius-release-el6.rpm
$ sudo yum install git2u
ところが、本日現在
https://repo.ius.io/6/i386/repodata/repomd.xml: [Errno 14] PYCURL ERROR 22 - "The requested URL returned error: 404 Not Found"
他のミラーを試します。
To address this issue please refer to the below knowledge base article

https://access.redhat.com/articles/1320623

If above article doesn't help to resolve this issue please open a ticket with Red Hat Support.

エラー: Cannot retrieve repository metadata (repomd.xml) for repository: ius. Please verify its path and try again
 もはや yum コマンドでインストールできない?
https://repo.ius.io/6/x86_64/repodata/repomd.xml
は、存在しているのだけど・・・。

続きを読む "CentOS6 での Git2.*" »

2018年06月30日

フックでプル&バックアップを自動化

 前回の構成「サーバー上のGitでWEBコンテンツリリース」で、(A/4)へのリリースや(B/3)へのバックアップを手動から自動にするには。
(A)で
$ sudo vi /opt/git/◆◆◆.git/hooks/post-receive
(B)からの push で、自動で(A)の★★★へリリース(pull)する場合
#!/bin/sh
git --git-dir=★★★/.git pull origin master
ただし、push 出来る人には制限が必要。
(A)のベアリポジトリ(1)/opt/git/◆◆◆.git への更新タイミングで(B/3)を自動更新(バックアップ)にする場合
#!/bin/sh
git --git-dir=/opt/git/◆◆◆.git push --mirror USER@HOST:/opt/git/◆◆◆.git
のように post-receive を作成し、実行権限をつけて完成。
$ sudo chown admin:wheel /opt/git/◆◆◆.git/hooks/post-receive
$ sudo chmod +x /opt/git/◆◆◆.git/hooks/post-receive

続きを読む "フックでプル&バックアップを自動化" »

サーバー上のGitでWEBコンテンツリリース

(A)WEBサーバ   (B)開発/検証/バックアップ機
(1) /opt/git/◆◆◆.git      
(2) ★★★
  <<-----ssh
ssh----->>
 
(3) △△△◆◆◆.git
(4) ★★★
   

続きを読む "サーバー上のGitでWEBコンテンツリリース" »

2016年04月04日

.gitignore 備忘録

設定情報やログなど ドキュメントルートのあちこちに配置してしまっている web のリソース。
『過去と他人は変えられないが未来と自分は変えられる』訳で Git の ".gitignore" を駆使。
# UTF8で除外設定 .gitignore

# カレントのみ AAAディレクトリ
/AAA/

# カレントのみ BBBファイル
/BBB

# カレント以下全階層 Smartyコンパイルディレクトリ
templates_c/

# カレント以下全階層 Appleゴミファイル
.DS_Store
# カレント以下全階層 Windowsゴミファイル
Thumbs.db
# カレント以下全階層 末尾が".CCC"ファイル
*.CCC
特定ディレクトリ内の除外設定は、特定ディレクトリ内の ".gitignore" に差分を記述。

About Git

ブログ「remix」のカテゴリ「Git」に投稿されたすべてのエントリーのアーカイブのページです。過去のものから新しいものへ順番に並んでいます。

前のカテゴリはethnaです。

次のカテゴリはjavaです。

他にも多くのエントリーがあります。メインページアーカイブページも見てください。

Powered by
Movable Type 3.34