Simulink project version管理 について
    2 views (last 30 days)
  
       Show older comments
    
現在、Simulinkモデルの開発を行っており、バージョン管理をしたいと考えています。そこで、Simulink Project でGithubでリソース管理できる機能があると知り実行しようとしました。モデルからプロジェクトを作成し、プロジェクト管理画面メニューまで見えるようになりました。しかし、Githubにリポジトリを作成しようとすると、「サーバとの接続が確立できませんでした」というエラーになります。Matlab経由ではない、通常どおりインターネット経由で同じユーザー名、パスワードを入れてアクセスすることはできます。この場合、何か事前にする必要があるのでしょうか。ヘルプにあるように、フォルダ内にgitattributesは作成しております。使用しているのは、Ver2016a
です。
もし、このようなトラブルの対応をご存じの方は教えて頂けないでしょうか
1 Comment
  Shoumei
      
 on 26 Jun 2019
				Simulink Projectとは直接関係ありませんが、「アドオン」メニューから「アドオンの入手」をクリックしてインストーラは起動しますか?
もししないのであればプロキシサーバーの設定が出来ていないんだと思います。「設定」の「Web」から設定してみて下さい。
Answers (1)
  stozaki
    
 on 31 Dec 2019
        
      Edited: stozaki
    
 on 31 Dec 2019
  
      ご質問を頂き、ありがとうございます。
既に解決されているかもしれませんが、Simulink プロジェクトとGitHubを連携する手順を簡単にまとめました。
(やり方は幾つかありますので、一例として考えて頂ければ幸いです)
- Git ソース管理の設定の「コマンドラインGitクライアントのインストール」セクションの1~4に従い、Gitをインストールしてください。2に記載されている[Use Git from the Windows Command Prompt] は最新のインストーラですと、次のような文面に変更されています。[Git from the command line and also from 3rd-party software]
- MATLABを起動し、コマンドウィンドウで次のコマンドを実行してMATLABからGitが実行出来ることを確認します。1のインストールが正しく実施されていれば、システム環境変数PATHにGitが登録され、システム全体でGitが使えるようになり、MATLABとの通信もできるはずです。
!git
         正しく認識すると、以下のようなメッセージが出力されます。
usage: git [--version] [--help] [-C <path>] [-c <name>=<value>]
           [--exec-path[=<path>]] [--html-path] [--man-path] [--info-path]
           [-p | --paginate | -P | --no-pager] [--no-replace-objects] [--bare]
           [--git-dir=<path>] [--work-tree=<path>] [--namespace=<name>]
           <command> [<args>]
These are common Git commands used in various situations:
start a working area (see also: git help tutorial)
   clone     Clone a repository into a new directory
   init      Create an empty Git repository or reinitialize an existing one
work on the current change (see also: git help everyday)
   add       Add file contents to the index
   mv        Move or rename a file, a directory, or a symlink
   restore   Restore working tree files
   rm        Remove files from the working tree and from the index
examine the history and state (see also: git help revisions)
   bisect    Use binary search to find the commit that introduced a bug
   diff      Show changes between commits, commit and working tree, etc
   grep      Print lines matching a pattern
   log       Show commit logs
   show      Show various types of objects
   status    Show the working tree status
grow, mark and tweak your common history
   branch    List, create, or delete branches
   commit    Record changes to the repository
   merge     Join two or more development histories together
   rebase    Reapply commits on top of another base tip
   reset     Reset current HEAD to the specified state
   switch    Switch branches
   tag       Create, list, delete or verify a tag object signed with GPG
collaborate (see also: git help workflows)
   fetch     Download objects and refs from another repository
   pull      Fetch from and integrate with another repository or a local branch
   push      Update remote refs along with associated objects
'git help -a' and 'git help -g' list available subcommands and some
concept guides. See 'git help <command>' or 'git help <concept>'
to read about a specific subcommand or concept.
See 'git help git' for an overview of the system.
         3. GitHubにリモートリポジトリを作成します。
         4. Simulink プロジェクトの「リモート」アイコンをクリックします。3で作成したリモートのURLを入力し、
        「検証」ボタンをクリックします。正しく通信完了すると「検証済み」となります。
        5.  この段階では、リモート トラッキングブランチが取得できていないので、一旦リモートのmasterをpullします。          (ローカルブランチもmasterの想定です)
        6. ローカルのファイルをリモートにコミットします。
        7. 以下、通常のGitのファイル操作となります。
ネットワークの問題も考えられますが、
MATLABとコマンドラインGitが通信出来ていないため、MATLAB経由ではGitが操作出来ていない可能性がございます。
1,2が正しく実施されていれば、恐らく問題は解決出来るかと思いますが、引き続きエラーが出力されるようでしたら、ネットワーク設定や、環境変数設定などを確認する必要があると思います。
お手数をお掛け致しますが、ご確認頂ければ幸いです。
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!

