変更セットを gogs にプッシュするには、gogs にリポジトリを作成し、コンテナーの起動時に公開されたポートを使用するリモートを追加する必要があります。不明な場合は、次を実行して HostPort エントリをメモします。コンテナーの名前が gogs であると仮定します。
docker inspect  --format "{{json .HostConfig.PortBindings}}" gogs
以下は、ssh リモートオリジンを設定する手順です。3000/tcp の HostPort エントリによってアクセスされる gogs Web UI を使用して公開鍵を追加します。gogs docker の指示に従った場合、これは次のようになります。http://localhost:10080 gogs がローカルで実行されていない場合は、localhost を gogs のホスト名に置き換えます。
~/.ssh/config代替 ssh ポートをより簡単に指定するには、次のホスト エントリを追加します。
Host gogs
    # if gogs is not running locally, add the remote hostname here
    Hostname localhost
    User git
    # the following should match what is listed for HostPort 22/tcp
    port 10022
で ssh ホスト エントリをテストしますssh gogs。動作する場合は、次のように表示されます。
PTY allocation request failed on channel 0
Hi there, You've successfully authenticated, but Gogs does not provide shell access.
If this is unexpected, please log in with password and setup Gogs under another user.
Connection to localhost closed.
以下をリモートとして追加します。
git remote add origin gogs:yourusername/your-repo.git
ssh ホスト エントリに置き換えgit@localhostていることに注意してください。gogs
これで、gogs リポジトリにプッシュできるはずです。