Installing and upgrading Git

このページの内容

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

[Security vulnerability CVE-2016-2324 & CVE-2016-2315] If you are running a Git version older than 2.4.11, 2.5.5, 2.6.6 or 2.7.4 (all released ), you should upgrade Git as soon as possible.

このページには次の方法が記載されています:

The information on this page applies to installing or upgrading Git on either your local machine, or on the Bitbucket Server instance.

Git のバージョンを確認する

The versions of Git supported by Bitbucket Server are listed on Supported platforms.

You can check your current version of Git by running the git --version command in a terminal (Linux, Mac OS X) or command prompt (Windows).

例:

git --version 
git version 2.7.4

サポートされるバージョンの Git がない場合は、Git をアップグレードするか、以下の方法でフレッシュインストールを実行する必要があります。

Linux で Git をインストールまたはアップグレードする

パッケージマネージャを使用して Git をインストールします。例えば、Ubuntu 13.10 の場合:

sudo apt-get install git

代替ダウンロードオプション:

  • Download the latest stable Git release from the Git website
  • 別の Linux ディストリビューションを使用している場合、最新の安定した Git バージョンを入手するため、別のパッケージリポジトリを使用する必要があります。 
  • If you need the most recent version of Git, you might need to install it from source.

 

Now check the Git version – you should see the new version of Git.

If you still can't see the expected Git version, you may need to add the Git install location to your path. Open your ~/.profile file in a text editor and add this line, where <path/to/git> is the install location for Git:

export PATH=$PATH:<path/to/git>

You can use the which git command to find the install location for Git.

Mac OS X で Git をインストールまたはアップグレードする

Download the latest stable Git release from the Git website

downloaded .dmg ファイルをクリックしてから、.pkg アイコンをダブルクリックしてインストーラを実行します。これにより、既存のバージョンの上に新しいバージョンの Git がインストールされます。

あるいは:

  • OS X とバンドルされたネイティブの Git を使用します。
  • Use Homebrew to download and install Git.

 

Now check the Git version – you should see the new version of Git.

If you still can't see the Git version, you may need to add the Git install location to your path. Open your ~/.profile file in a text editor and add this line, where <path/to/git> is the install location for Git:

export PATH=$PATH:<path/to/git>

You can use the which git command to find the install location for Git.

Windows で Git をインストールまたはアップグレードする

Download the latest stable Git release from the Git website.

Run the Git installer, ensuring that you install into the same location as any existing Git installation. You can use where git to locate existing installations. Installing Git for Windows (msysGit) also installs a supported version of Perl.

パスで git.exe が利用可能なことを確認するには、以下のいずれかを選択します:

  • Windows コマンドプロンプトで Git を実行するか、あるいは 
  • Windows コマンドプロンプトから Git と付属の Unix ツールを実行します

Do not select Use Git Bash only when installing or upgrading Git for the Bitbucket Server instance -- this will not work with Bitbucket Server.

Now, check the Git version – you should see the new version of Git.

(warning) msysGit is the only supported distribution when running Bitbucket Server on Windows. Cygwin Git is not supported and has known issues.

If you have successfully installed msysGit but you receive the error "Unable to find git!" when installing Bitbucket Server, you should abort the installation, restart the Windows server, then restart the Bitbucket Server installation.

 

Restart Bitbucket Server if necessary

If you've been installing or upgrading Git for the Bitbucket Server instance, rather than for your local machine, you'll need to stop and restart Bitbucket Server so that it will pick up the upgraded version of Git. See Starting and stopping Bitbucket Server for details.

 

Last modified on Mar 23, 2016

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.