ゴーグにチェンジセットをプッシュするには、ゴーグにレポを作成し、コンテナの開始時に公開されたポートを使用するリモートを追加する必要があります。不明な場合は、以下を実行し、HostPortエントリに注意してください。コンテナはgogsという名前と仮定すると:
docker inspect --format "{{json .HostConfig.PortBindings}}" gogs
SSHリモートの原点を設定する手順は次のとおり。 3000/tcpのHostPortエントリでアクセスするgogs webを使用して公開鍵を追加します。ゴーグルドッカーの指示に従った場合は、http://localhost:10080ゴーグルがローカルで実行されていない場合は、localhostをゴーグルホスト名に置き換えてください。
より容易に代替のSSHポートを指定する~/.ssh/config
に次のホストエントリを追加:
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 gogs
とのSSHホストエントリ。それが動作する場合は、表示されるはずです。
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.
をリモートとして以下を追加します。あなたはgogs
SSHホストエントリで[email protected]
を交換している
git remote add origin gogs:yourusername/your-repo.git
注意。
あなたのゴーグル・レポにプッシュできるはずです。
ありがとうございます!当初、いくつかの構成上の問題があったが(https://github.com/gogits/gogs/issues/3019)、これですべてがうまくいった。再度、感謝します! – Ole
私はそれが助けてうれしい! –